이 페이지에서는 Google Kubernetes Engine(GKE)에서 Kubernetes 및 GKE의 인터넷 보안 센터(CIS) 벤치마크 준수를 개선하기 위해 취하는 방법을 설명합니다. 이 페이지에는 다음 정보가 포함되어 있습니다.
CIS Kubernetes 벤치마크를 준수하도록 관리형 GKE 컨트롤 플레인을 구성하는 방법
CIS Google Kubernetes Engine(GKE) 벤치마크를 준수하도록 GKE 노드와 워크로드를 구성하는 방법
CIS 벤치마크 정보
CIS는 Kubernetes의 보안 구성 가이드라인이 포함된 다음 벤치마크를 출시합니다.
CIS Kubernetes 벤치마크: 오픈소스 Kubernetes 프로젝트에 적용됩니다.
이는 다양한 자체 관리형 및 호스팅된 Kubernetes 구현에 대한 안내를 제공하기 위함입니다.
CIS GKE 벤치마크: GKE 클러스터에서 제어할 수 있는 구성요소의 보안 구성에 대한 가이드라인을 설정합니다. Google Cloud의 GKE에 대한 권장사항이 포함됩니다.
CIS GKE 벤치마크를 우선시하는 것이 좋습니다. Google Cloud의 GKE에만 해당되기 때문입니다. CIS Kubernetes 벤치마크에는 GKE에서 보거나 수정할 수 없는 제어에 대한 다양한 권장사항이 포함되어 있습니다. Google의 클러스터 보안 방법에는 오픈소스 Kubernetes 벤치마크의 범위를 벗어나고 이러한 권장사항과 충돌할 수 있는 완화 조치가 포함됩니다.
GKE에 적용되는 기타 벤치마크
CIS GKE 벤치마크와 CIS Kubernetes 벤치마크 외에도 다음 벤치마크가 GKE에서 사용할 수 있는 운영체제에 적용됩니다. 특정 OS 벤치마크에서 Kubernetes 사용을 명시적으로 다루지 않더라도 추가 보안 안내를 위해 해당 벤치마크를 계속 참조해야 합니다.
컨트롤 플레인 VM, API 서버, 구성요소(예: etcd, kube-controller-manager, kube-scheduler)가 포함된 컨트롤 플레인
노드 운영체제
이러한 구성요소는 GKE에서 소유한 프로젝트에 있으므로 해당 CIS 벤치마크 컨트롤에 대해 이러한 구성요소를 수정하거나 평가할 수 없습니다. 하지만 워커 노드와 워크로드에 적용되는 CIS 벤치마크 제어를 평가하고 해결할 수 있습니다. GKE 공유 책임 모델에 따라 개발자가 이러한 구성요소를 담당합니다.
CIS 벤치마크를 위한 Google의 GKE 보안 강화 방법
GKE는 오픈소스 Kubernetes의 관리형 구현입니다. Google은 컨트롤 플레인을 완전히 관리하고 컨트롤 플레인 구성요소 구성을 보호할 책임이 있습니다. 다음 표에는 CIS 벤치마크의 점수에 영향을 줄 수 있는 Google의 결정사항 일부가 나와 있습니다.
GKE 보안 방법
인증
일부 GKE 모니터링 구성요소에는 측정항목을 얻기 위해 익명 인증이 사용됩니다. GKE에서는 kubelet에 대해 익명 인증이 허용되지만 추가 디버깅 핸들러가 사용 중지되므로 노출은 읽기 전용 포트와 동일합니다.
일부 컨트롤 플레인 구성요소는 정적 토큰을 통해 부트스트랩된 후 API 서버 인증에 사용됩니다. 이러한 토큰은 VM이 시작되거나 다시 시작될 때마다 생성됩니다.
허용 컨트롤러
GKE는 다음 허용 컨트롤러를 사용 중지합니다.
EventRateLimit: Kubernetes의 알파 기능입니다.
AlwaysPullImages: 이 컨트롤러는 클러스터에 새 포드를 만들기 위해 이미지 레지스터를 단일 장애점으로 만드는 대신 비협업 멀티테넌트 클러스터의 비공개 레지스트리 이미지에 대한 일부 보호를 제공합니다.
SecurityContextDeny: 포드 보안 허용 컨트롤러가 선호되며 모든 GKE 버전에서 사용 가능합니다.
GKE Enterprise를 사용하는 경우 정책 컨트롤러를 사용하여 포드 보안 표준을 적용할 수도 있습니다.
ImagePolicyWebhook: GKE에는 이미지 관리 및 보안을 위한 자체 메커니즘이 있으므로 기본적으로 ImagePolicyWebhook가 사용 중지됩니다. 이를 통해 GKE는 환경을 더 엄격하게 제어하고 보안 관행이 일관되게 적용되도록 보장할 수 있습니다.
하지만 정책 관리에 Binary Authorization 또는 정책 컨트롤러를 사용할 수 있습니다.
감사 로깅
GKE는 GKE 감사 정책을 사용하여 감사 로그를 캡처합니다.
따라서 Kubernetes API 서버 감사 로깅 플래그를 설정할 필요가 없습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-11-22(UTC)"],[],[],null,["# CIS Benchmarks\n\n[Autopilot](/kubernetes-engine/docs/concepts/autopilot-overview) [Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nThis page describes the approach that Google Kubernetes Engine (GKE) takes to\nimprove compliance with the Center for Internet Security (CIS) benchmarks for\nKubernetes and for GKE. This page includes the following\ninformation:\n\n- How we configure the managed GKE control plane to conform to the CIS Kubernetes Benchmark\n- How you can configure your GKE nodes and workloads to conform to the CIS Google Kubernetes Engine (GKE) Benchmark\n\nAbout the CIS Benchmarks\n------------------------\n\nCIS releases the following benchmarks that contain secure configuration\nguidelines for Kubernetes:\n\n- **CIS Kubernetes Benchmark**: Applies to the open source Kubernetes project. Intended to provide guidance for a variety of self-managed and hosted Kubernetes implementations.\n- **CIS GKE Benchmark**: Establishes guidelines for the secure configuration of components you can control in GKE clusters. Includes recommendations that are specific to GKE on Google Cloud.\n\nWe recommend that you **prioritize the CIS GKE Benchmark**, because it is\nspecific to GKE on Google Cloud. The CIS Kubernetes\nBenchmark contains many recommendations for controls that you can't view or\nmodify in GKE. Our approach to cluster security includes\nmitigations that go beyond the scope of the open source Kubernetes benchmark and\nmight result in conflicts with those recommendations.\n\n### Other benchmarks that apply to GKE\n\nIn addition to the CIS GKE Benchmark and the CIS Kubernetes Benchmark, the following benchmarks apply to the operating systems that are available in GKE. Even if a specific OS benchmark doesn't explicitly address Kubernetes usage, you should still reference that benchmark for additional security guidance.\n\n- [**Container-Optimized OS Benchmark**](https://www.cisecurity.org/benchmark/google_cloud_computing_platform): the default operating system that's installed on all GKE Linux nodes\n- [**Ubuntu Linux Benchmark**](https://www.cisecurity.org/benchmark/ubuntu_linux): available for GKE Standard\n- [**Windows Server Benchmark**](https://www.cisecurity.org/benchmark/microsoft_windows_server): available for GKE Standard\n\nThe default container runtime, containerd, doesn't have a benchmark.\n\n### Shared responsibility model\n\nBased on the\n[GKE shared responsibility model](/kubernetes-engine/docs/concepts/shared-responsibility),\nwe manage the following components for you:\n\n- The control plane, including the control plane VMs, API server, and components like the cluster state database (etcd or Spanner-based), kube-controller-manager, and kube-scheduler.\n- The node operating system.\n\nThese components exist in a project that GKE owns, so you can't\nmodify or evaluate any of these components against corresponding CIS Benchmark\ncontrols. You can, however, evaluate and remediate any CIS Benchmark controls\nthat apply to your worker nodes and your workloads. Based on the\nGKE shared responsibility model, these components are your\nresponsibility.\n\nOur approach to securing GKE for the CIS Benchmark\n--------------------------------------------------\n\nGKE is a managed implementation of open source Kubernetes. We\nfully manage the control plane and are responsible for securing the\nconfiguration of control plane components. The following table describes some of\nour decisions that might affect scoring of the CIS benchmarks:\n\nEvaluate GKE against the CIS Benchmarks\n---------------------------------------\n\n| **Note:** This section mentions third-party applications like `kube-bench`. The versions of the CIS Benchmarks that these applications evaluate might not be the latest available versions. Ensure that you check which version your chosen application uses for evaluations.\n\nYou can automate evaluation of your clusters against the Benchmarks by using one\nof the following methods:\n\n- CIS GKE Benchmark:\n - Run `kube-bench` to evaluate worker nodes against the Benchmark. For details, see the [kube-bench GitHub repository](https://github.com/aquasecurity/kube-bench).\n - Use a third-party tool like Twistlock Defender to evaluate nodes against the Benchmark.\n- CIS Kubernetes Benchmark: Run `kube-bench` to evaluate worker nodes against the Benchmark. You can't evaluate the managed control plane against those recommendations in the Benchmark.\n\nWhat's next\n-----------\n\n- Read the [GKE security overview](/kubernetes-engine/docs/concepts/security-overview).\n- Follow security best practices in the [GKE hardening guide](/kubernetes-engine/docs/how-to/hardening-your-cluster).\n- Learn about monitoring your clusters for security issues with [GKE security posture](/kubernetes-engine/docs/concepts/about-security-posture-dashboard).\n- Learn how to evaluate your clusters for compliance issues in the [GKE compliance dashboard](/kubernetes-engine/fleet-management/docs/about-compliance-dashboard) for GKE Enterprise."]]