Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, explicamos o que é o Policy Controller e como você pode usá-lo para garantir
que os clusters e as cargas de trabalho do Kubernetes sejam executados de maneira segura e
compatível.
Esta página é destinada a administradores de TI, operadores e
especialistas em segurança que definem soluções de TI e arquitetura de sistemas
de acordo com a estratégia da empresa e garantem que todos os recursos em execução
na plataforma de nuvem atendam aos requisitos de conformidade organizacional
fornecendo e mantendo a automação para auditoria ou aplicação. Para saber mais sobre papéis comuns e
tarefas de exemplo referenciados no conteúdo do Google Cloud, consulte
Tarefas e funções de usuário comuns do GKE Enterprise.
O Policy Controller permite a aplicação de políticas programáveis
aos clusters do Kubernetes. Essas políticas funcionam como proteções e podem ajudar nas práticas recomendadas, na segurança e no gerenciamento de conformidade dos clusters e frotas. Com base no projeto de código aberto Gatekeeper do
Open Policy Agent,
o Policy Controller é totalmente integrado ao Google Cloud
e inclui um painel integrado para facilitar a observação e vem com uma biblioteca completa de políticas predefinidas para controles comuns de segurança e conformidade.
O Policy Controller está disponível com uma licença do Google Kubernetes Engine (GKE) Enterprise.
Benefícios do Policy Controller
Integrado com o Google Cloud: os administradores da plataforma podem instalar o Policy Controller usando o console do Google Cloud, o Terraform ou o Google Cloud CLI em qualquer cluster conectado à sua frota. O Policy Controller funciona com outros
serviços do Google Cloud, como o
Config Sync, métricas e o Cloud Monitoring.
Pacotes de políticas pré-criados: o Policy Controller vem com uma biblioteca completa de políticas predefinidas para controles comuns de segurança e conformidade. Eles
incluem os pacotes de
políticas, que são criados
e mantidos pelo Google, e a biblioteca de modelos de restrição.
Compatível com políticas personalizadas: se a personalização da política for necessária além
do que está disponível na biblioteca de modelos de restrição, o Policy Controller
também será compatível com o desenvolvimento de modelos de restrição.
Observabilidade integrada: o Policy Controller inclui um painel do console do Google Cloud, que fornece uma visão geral do estado de todas as políticas aplicadas à sua frota (incluindo
clusters não registrados). No painel, veja o status de conformidade e aplicação para ajudar a resolver problemas e receba recomendações opinativas para resolver violações da política.
Pacotes de políticas
É possível usar pacotes de políticas para aplicar várias restrições agrupadas
em um padrão, segurança ou tema de conformidade específico do Kubernetes. Esses
pacotes de políticas são criados e mantidos pelo Google e, portanto, estão prontos para
você usar sem precisar escrever código. Por exemplo, é possível usar os seguintes pacotes de políticas:
Aplicar muitos dos mesmos requisitos que PodSecurityPolicies,
mas com a capacidade extra de auditar a configuração antes
de forçar a aplicação, garantindo que as alterações na política não sejam disruptivas nas cargas de trabalho em, execução.
O Policy Controller aplica a conformidade dos clusters usando objetos chamados
restrições. Pense nas restrições como elementos básicos da política.
Cada restrição define uma alteração específica na API Kubernetes que é permitida ou proibida no cluster em que é aplicada. É possível definir políticas para bloquear ativamente solicitações de API não compatíveis ou auditar a configuração dos clusters e denunciar violações. Em ambos os casos, é possível visualizar mensagens de aviso com detalhes sobre qual violação ocorreu em um cluster. Com essas informações, é possível corrigir problemas. Por exemplo, é possível usar as seguintes restrições
individuais:
Essas são apenas algumas das restrições fornecidas na biblioteca de modelos
de restrição incluída
no Policy Controller. Essa biblioteca contém várias políticas que podem
ser usadas para ajudar a aplicar as práticas recomendadas e limitar os riscos. Se você precisar de mais personalização
além do que está disponível na biblioteca de modelos de restrição, também é possível criar
modelos de
restrição personalizados.
As restrições podem ser aplicadas diretamente aos clusters usando a API Kubernetes
ou distribuídas a um conjunto de clusters a partir de uma fonte centralizada, como um repositório Git, usando o
Config Sync.
[[["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 2024-11-26 UTC."],[],[],null,["# Policy Controller overview\n\nThis page explains what Policy Controller is and how you can use it to help ensure\nyour Kubernetes clusters and workloads are running in a secure and compliant\nmanner.\n\nThis page is for IT administrators, Operators, and\nSecurity specialists who define IT solutions and system architecture\nin accordance with company strategy, and ensure that all resources running\nwithin the cloud platform meet organizational compliance requirements by\nproviding and maintaining automation to audit or enforce. To learn more about\ncommon roles and example tasks that we reference in Google Cloud content, see\n[Common GKE user roles and tasks](/kubernetes-engine/enterprise/docs/concepts/roles-tasks).\n\nPolicy Controller enables the application and enforcement of programmable policies\nfor your Kubernetes clusters. These policies act as **guardrails** and can help\nwith best practices, security, and compliance management of your clusters and\nfleet. Based on the open source\n[Open Policy Agent Gatekeeper](https://open-policy-agent.github.io/gatekeeper/website/docs/)\nproject, Policy Controller is fully integrated with Google Cloud,\nincludes a built-in dashboard,\nfor observability, and comes with a full library of prebuilt policies for\ncommon security and compliance controls.\n\nPolicy Controller is available with a Google Kubernetes Engine (GKE) Enterprise edition license.\n\nPolicy Controller benefits\n--------------------------\n\n- **Integrated with Google Cloud** : Platform admins can [install\n Policy Controller](/kubernetes-engine/enterprise/policy-controller/docs/how-to/installing-policy-controller) by using the Google Cloud console, by using Terraform, or by using Google Cloud CLI on any cluster connected to your fleet. Policy Controller works with other Google Cloud services like [Config Sync](/kubernetes-engine/enterprise/config-sync/docs/overview), [metrics](/kubernetes-engine/enterprise/policy-controller/docs/how-to/policy-controller-metrics), and Cloud Monitoring.\n- **Supports multiple enforcement points** : In addition to both audit and admission control for your cluster, Policy Controller can optionally enable a [shift-left\n approach](/architecture/devops/devops-tech-shifting-left-on-security) to [analyse and catch non-compliant changes](/kubernetes-engine/enterprise/policy-controller/docs/tutorials/app-policy-validation-ci-pipeline) prior to application.\n- **Prebuilt policy bundles** : Policy Controller comes with a full library of prebuilt policies for common security and compliance controls. These include both [Policy\n bundles](/kubernetes-engine/enterprise/policy-controller/docs/concepts/policy-controller-bundles) and the [constraint template library](/kubernetes-engine/enterprise/policy-controller/docs/latest/reference/constraint-template-library).\n- **Supports custom policies** : If policy customization is required beyond what is available using the [constraint template library](/kubernetes-engine/enterprise/policy-controller/docs/latest/reference/constraint-template-library), Policy Controller additionally supports the development of custom [*constraint templates*](/kubernetes-engine/enterprise/policy-controller/docs/how-to/write-custom-constraint-templates).\n- **Built-in observability** : Policy Controller includes a Google Cloud console [dashboard](/kubernetes-engine/enterprise/policy-controller/docs/how-to/policy-controller-status), providing an overview for the state of all the policies applied to your fleet (including unregistered clusters). From the dashboard, view compliance and enforcement status to help you troubleshoot, and get opinionated recommendations to resolve policy violations.\n\nPolicy bundles\n--------------\n\nYou can use policy bundles to apply a number of constraints that are grouped\nunder a specific Kubernetes standard, security, or compliance theme.\nFor example, you can use the following policy bundles:\n\n- [Enforce many of the same requirements as\n PodSecurityPolicies](/kubernetes-engine/enterprise/policy-controller/docs/how-to/using-constraints-to-enforce-pod-security), but with the added ability to audit your configuration before enforcing it, ensuring any policy changes aren't disruptive to running workloads.\n- [Use constraints compatible with\n Cloud Service Mesh](/kubernetes-engine/enterprise/policy-controller/docs/how-to/using-asm-security-policy) to audit the compliance of your mesh security vulnerabilities and best practices.\n- [Apply general best practices to your cluster resources](/kubernetes-engine/enterprise/policy-controller/docs/how-to/using-policy-essentials-v2022) to help strengthen your security posture.\n\n[Policy Controller bundles overview](/kubernetes-engine/enterprise/policy-controller/docs/concepts/policy-controller-bundles)\nprovides more details and a list of currently available policy bundles.\n\nConstraints\n-----------\n\nPolicy Controller enforces your clusters' compliance using objects called\n*constraints* . You can think of constraints as the \"building blocks\" of policy.\nEach constraint defines a specific change to the Kubernetes API that is allowed\nor disallowed on the cluster it's applied to. You can set policies to either\nactively block non-compliant API requests or\n[audit](/kubernetes-engine/enterprise/policy-controller/docs/how-to/auditing-constraints) the configuration of your\nclusters and report violations. In either case, you can view warning messages\nwith details on what violation occurred on a cluster. With that information, you\ncan remediate problems. For example, you can use the following individual\nconstraints:\n\n- [Require each namespace to have at least one\n label](/kubernetes-engine/enterprise/policy-controller/docs/latest/reference/constraint-template-library#k8srequiredlabels). This constraint can be used to ensure accurate tracking of resource consumption when using GKE Usage Metering, for example.\n- [Restrict the repositories a given container image can be pulled from](/kubernetes-engine/enterprise/policy-controller/docs/latest/reference/constraint-template-library#k8sallowedrepos). This constraint ensures any attempt to pull containers from unknown sources is denied, protecting your clusters from running potentially malicious software.\n- [Control whether or not a container can run in privileged mode](/kubernetes-engine/enterprise/policy-controller/docs/latest/reference/constraint-template-library#k8spspprivilegedcontainer). This constraint controls the ability of any container to enable privileged mode, which gives you control over which containers (if any) can run with unrestricted policy.\n\nThese are just a few of the constraints provided in the [constraint template\nlibrary](/kubernetes-engine/enterprise/policy-controller/docs/latest/reference/constraint-template-library) included\nwith Policy Controller. This library contains numerous policies that you can use\nto help enforce best practices and limit risk. If you require more customization\nbeyond what is available in the constraint template library, you can also create\ncustom [constraint\ntemplates](/kubernetes-engine/enterprise/policy-controller/docs/how-to/write-custom-constraint-templates).\n\nConstraints can be applied directly to your clusters using the Kubernetes API,\nor distributed to a set of clusters from a centralized source, like a Git repository, by using [Config Sync](/kubernetes-engine/enterprise/config-sync/docs/config-sync-overview).\n\nWhat's next\n-----------\n\n- [Install Policy Controller](/kubernetes-engine/enterprise/policy-controller/docs/how-to/installing-policy-controller).\n- [Learn about policy bundles](/kubernetes-engine/enterprise/policy-controller/docs/concepts/policy-controller-bundles).\n- [Apply policy bundles](/kubernetes-engine/enterprise/policy-controller/docs/how-to/apply-policy-bundles)"]]