This page describes the approach that Google Kubernetes Engine (GKE) takes to improve compliance with the Center for Internet Security (CIS) benchmarks for Kubernetes and for GKE. This page includes the following information:
- How we configure the managed GKE control plane to conform to the CIS Kubernetes Benchmark
- How you can configure your GKE nodes and workloads to conform to the CIS Google Kubernetes Engine (GKE) Benchmark
About the CIS Benchmarks
CIS releases the following benchmarks that contain secure configuration guidelines for Kubernetes:
- CIS Kubernetes Benchmark: Applies to the open source Kubernetes project. Intended to provide guidance for a variety of self-managed and hosted Kubernetes implementations.
- 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.
We recommend that you prioritize the CIS GKE Benchmark, because it is specific to GKE on Google Cloud. The CIS Kubernetes Benchmark contains many recommendations for controls that you can't view or modify in GKE. Our approach to cluster security includes mitigations that go beyond the scope of the open source Kubernetes benchmark and might result in conflicts with those recommendations.
Other benchmarks that apply to GKE
In 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.
- Container-Optimized OS Benchmark: the default operating system that's installed on all GKE Linux nodes
- Ubuntu Linux Benchmark: available for GKE Standard
- Windows Server Benchmark: available for GKE Standard
The default container runtime, containerd, doesn't have a benchmark.
Shared responsibility model
Based on the GKE shared responsibility model, we manage the following components for you:
- The control plane, including the control plane VMs, API server, and components like etcd, kube-controller-manager, and kube-scheduler.
- The node operating system.
These components exist in a project that GKE owns, so you can't modify or evaluate any of these components against corresponding CIS Benchmark controls. You can, however, evaluate and remediate any CIS Benchmark controls that apply to your worker nodes and your workloads. Based on the GKE shared responsibility model, these components are your responsibility.
Our approach to securing GKE for the CIS Benchmark
GKE is a managed implementation of open source Kubernetes. We fully manage the control plane and are responsible for securing the configuration of control plane components. The following table describes some of our decisions that might affect scoring of the CIS benchmarks:
GKE security approach | |
---|---|
Authentication |
|
Admission controllers | GKE disables the following admission controllers:
|
Audit logging | GKE captures audit logs using the GKE audit policy. As a result, we don't need to set any Kubernetes API server audit logging flags. |
Debugging | GKE uses profiling for debugging. |
Encryption |
|
kubelet |
|
Evaluate GKE against the CIS Benchmarks
You can automate evaluation of your clusters against the Benchmarks by using one of the following methods:
CIS GKE Benchmark:
- All GKE editions:
- Run
kube-bench
to evaluate worker nodes against the Benchmark. For details, see the kube-bench GitHub repository. - Use a third-party tool like Twistlock Defender to evaluate nodes against the Benchmark.
- Run
- GKE Enterprise edition: use the Compliance dashboard to evaluate all of your clusters for compliance with the CIS GKE Benchmark. For details, see About the GKE Compliance Dashboard.
- All GKE editions:
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.
What's next
- Read the GKE security overview.
- Follow security best practices in the GKE hardening guide.
- Learn about monitoring your clusters for security issues with GKE security posture.
- Learn how to evaluate your clusters for compliance issues in the GKE compliance dashboard for GKE Enterprise.