Se você já tem uma frota, é possível ativar a CV. No entanto, ativar a CV em uma frota já existente não afeta cargas de trabalho em clusters de membros da frota atuais. Se você quiser que as cargas de trabalho atuais tenham a CV ativada, será necessário ativar o recurso em clusters individuais.
Para ativar a CV em uma frota já existente, execute o seguinte comando:
POLICY_PROJECT_ID: o ID do projeto em que a política está armazenada
POLICY_ID: o ID da política
Desativar
Desativar a CV afeta apenas as cargas de trabalho nos novos clusters de membros da frota.
Se você quiser que as cargas de trabalho atuais tenham a CV desativada, será necessário desativar o recurso em clusters individuais.
Para desativar a CV em qualquer cluster de novo membro, execute o seguinte comando:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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"]]