Si ya tienes una flota, puedes habilitar la CV. Sin embargo, habilitar la CV para una flota existente no afecta las cargas de trabajo en los clústeres miembros existentes de la flota. Si deseas que las cargas de trabajo existentes tengan habilitada la CV, debes habilitar la función en clústeres individuales.
Para habilitar la CV en una flota existente, ejecuta el siguiente comando:
POLICY_PROJECT_ID: el ID del proyecto en el que se almacena la política
POLICY_ID: el ID de la política
Inhabilitar
La inhabilitación de la CV solo afecta las cargas de trabajo en los clústeres nuevos de los miembros de la flota.
Si deseas que la CV tenga inhabilitada la CV, debes inhabilitar la función en clústeres individuales.
Para inhabilitar la CV en cualquier clúster de miembro nuevo, ejecuta el siguiente comando:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[],[],null,["| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nIf you are using [fleets](/kubernetes-engine/fleet-management/docs) with\nyour Google Kubernetes Engine clusters, then\nyou can enable continuous validation (CV) as a fleet-default configuration. This\nmeans that every new GKE on Google Cloud cluster [registered\nduring cluster\ncreation](/anthos/fleet-management/docs/register/gke#register_your_cluster) will\nhave CV enabled on the cluster. You can find out more\nabout fleet default configuration in\n[Manage fleet-level features](/anthos/fleet-management/docs/manage-features).\n\nBefore you begin\n\n1. [Enable Binary Authorization](/binary-authorization/docs/enabling).\n2. Enable the GKE API.\n\n \u003cbr /\u003e\n\n [Enable GKE API](https://console.cloud.google.com/flows/enableapi?apiid=container.googleapis.com)\n\n \u003cbr /\u003e\n\n3. [Update the Google Cloud CLI](/sdk/docs/components#updating_components) to\n version 457.0.0 or later.\n\n4. [Create your platform policies](/binary-authorization/docs/manage-platform-policies).\n\nEnable on a new fleet\n\nTo enable CV on a new fleet, run the following command: \n\n gcloud container fleet create \\\n --binauthz-evaluation-mode=POLICY_BINDINGS \\\n --binauthz-policy-bindings=name=projects/\u003cvar translate=\"no\"\u003ePOLICY_PROJECT_ID\u003c/var\u003e/platforms/gke/policies/\u003cvar translate=\"no\"\u003ePOLICY_ID\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePOLICY_PROJECT_ID\u003c/var\u003e: the ID of the project where the policy is stored\n- \u003cvar translate=\"no\"\u003ePOLICY_ID\u003c/var\u003e: the policy ID\n\nYou can also create a new fleet with multiple platform policies: \n\n gcloud container fleet create \\\n --binauthz-evaluation-mode=POLICY_BINDINGS \\\n --binauthz-policy-bindings=name=projects/\u003cvar translate=\"no\"\u003ePOLICY_PROJECT_ID\u003c/var\u003e/platforms/gke/policies/\u003cvar translate=\"no\"\u003ePOLICY_ID_1\u003c/var\u003e \\\n --binauthz-policy-bindings=name=projects/\u003cvar translate=\"no\"\u003ePOLICY_PROJECT_ID\u003c/var\u003e/platforms/gke/policies/\u003cvar translate=\"no\"\u003ePOLICY_ID_2\u003c/var\u003e\n\nEnable on an existing fleet\n\nIf you have an existing fleet, you can enable CV. However,\nenabling CV for an existing fleet doesn't affect workloads in\nexisting fleet member clusters. If you want existing workloads to have\nCV enabled, you need to [enable the feature on individual\nclusters](/binary-authorization/docs/manage-platform-policies#update-cluster-platform-policy).\n\nTo enable CV on an existing fleet, run the following command: \n\n gcloud container fleet update \\\n --binauthz-evaluation-mode=POLICY_BINDINGS \\\n --binauthz-policy-bindings=name=projects/\u003cvar translate=\"no\"\u003ePOLICY_PROJECT_ID\u003c/var\u003e/platforms/gke/policies/\u003cvar translate=\"no\"\u003ePOLICY_ID\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePOLICY_PROJECT_ID\u003c/var\u003e: the ID of the project where the policy is stored\n- \u003cvar translate=\"no\"\u003ePOLICY_ID\u003c/var\u003e: the policy ID\n\nDisable\n\nDisabling CV only affects workloads in new fleet member clusters.\nIf you want existing workloads to have CV disabled, you need to\n[disable the feature on individual clusters](/binary-authorization/docs/disabling).\n\nTo disable CV on any new member clusters, run the following\ncommand: \n\n gcloud container fleet update \\\n --binauthz-evaluation-mode=DISABLED"]]