이 페이지에서는 정책 컨트롤러에 대해 소개하고 이를 사용하여 Kubernetes 클러스터와 워크로드를 규정을 준수하는 안전한 방식으로 실행하는 방법을 설명합니다.
이 페이지는 회사 전략에 따라 IT 솔루션과 시스템 아키텍처를 정의하고 감사 또는 시행 자동화를 제공하고 유지하여 클라우드 플랫폼 내에서 실행되는 모든 리소스가 조직의 규정 준수 요구사항을 충족하도록 보장하는 IT 관리자, 운영자, 보안 전문가를 위해 작성되었습니다. Google Cloud 콘텐츠에서 참조하는 일반적인 역할 및 예시 태스크에 대해 자세히 알아보려면 일반 GKE Enterprise 사용자 역할 및 태스크를 참조하세요.
정책 컨트롤러를 사용 설정하면 Kubernetes 클러스터에 프로그래밍 가능한 정책을 적용하고 시행할 수 있습니다. 정책은 가드레일 역할을 하며 클러스터와 Fleet의 권장사항, 보안, 규정 준수 관리에 도움이 됩니다. 오픈소스 Open Policy Agent Gatekeeper 프로젝트를 기반으로 하는 정책 컨트롤러는 Google Cloud와 완전히 통합되었으며, 관측 가능성을 위해 기본 제공되는 대시보드를 포함하며, 공통 보안 및 규정준수 제어를 위해 사전 빌드된 정책의 전체 라이브러리와 함께 제공됩니다.
정책 컨트롤러는 Google Kubernetes Engine(GKE) Enterprise 버전 라이선스에서 제공됩니다.
정책 컨트롤러 이점
Google Cloud와 통합: 플랫폼 관리자는 Google Cloud 콘솔, Terraform 또는 Google Cloud CLI를 사용하여 Fleet에 연결된 모든 클러스터에서 정책 컨트롤러를 설치할 수 있습니다. 정책 컨트롤러는 구성 동기화, 측정항목, Cloud Monitoring과 같은 다른Google Cloud 서비스와 함께 작동합니다.
사전 구축된 정책 번들: 정책 컨트롤러는 공통 보안 및 규정 준수 제어를 위해 사전 빌드된 정책의 전체 라이브러리와 함께 제공됩니다. 여기에는 정책 번들과 제약조건 템플릿 라이브러리가 모두 포함됩니다.
커스텀 정책 지원: 제약조건 템플릿 라이브러리를 사용하여 제공되는 것 이상으로 정책 맞춤설정이 필요한 경우 정책 컨트롤러는 또한 커스텀 제약조건 템플릿 개발을 지원합니다.
기본 제공되는 관측 가능성: 정책 컨트롤러에는 Fleet에 적용된 모든 정책의 상태에 대한 개요를 제공하는 Google Cloud 콘솔 대시보드가 포함됩니다 (미등록 클러스터 포함). 대시보드에서 문제 해결에 도움이 되는 규정 준수 및 시행 상태를 확인하고 정책 위반을 해결하기 위한 설득력 있는 권장사항을 얻을 수 있습니다.
정책 번들
정책 번들을 사용하여 특정 Kubernetes 표준, 보안, 규정 준수 테마로 그룹화된 많은 제약조건을 적용할 수 있습니다.
예를 들어 다음 정책 번들을 사용할 수 있습니다.
정책 컨트롤러는 제약조건이라고 하는 객체를 사용하여 클러스터 규정 준수를 시행합니다. 제약조건은 정책의 '구성요소'와 같습니다.
각 제약조건은 적용된 클러스터에서 허용 또는 금지되는 Kubernetes API에 대한 특정 변경사항을 정의합니다. 정책을 사용하여 규정을 준수하지 않는 API 요청을 적극적으로 차단하거나 클러스터 구성을 감사하고 위반사항을 신고할 수 있습니다. 어느 경우든지 클러스터에 발생한 위반에 대한 세부정보와 함께 경고 메시지를 확인할 수 있습니다. 이 정보를 사용해서 문제를 해결할 수 있습니다. 예를 들어 다음 개별 제약조건을 사용할 수 있습니다.
이는 정책 컨트롤러에 포함된 제약조건 템플릿 라이브러리에 제공되는 제약조건 중 일부에 불과합니다. 이 라이브러리에는 권장사항을 시행하고 위험을 제한하는 데 사용할 수 있는 많은 정책이 포함되어 있습니다. 제약조건 템플릿 라이브러리에서 제공하는 것 이상의 맞춤설정이 필요한 경우 커스텀 제약조건 템플릿을 만들 수도 있습니다.
Kubernetes API를 사용하여 제약조건을 직접 클러스터에 적용하거나 구성 동기화를 사용하여 Git 저장소와 같은 중앙 집중식 소스의 클러스터 집합에 배포할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-22(UTC)"],[],[],null,["This 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 benefits\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\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\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- [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)"]]