CIS Kubernetes Benchmark v1.7.0 PDF
CIS Kubernetes Benchmark v1.7.0 PDF
Benchmark
v1.7.0 - 03-20-2023
Terms of Use
Please see the below link for our current terms of use:
https://www.cisecurity.org/cis-securesuite/cis-securesuite-membership-terms-of-use/
Page 1
Table of Contents
Terms of Use .................................................................................................................. 1
Table of Contents ........................................................................................................... 2
Overview ......................................................................................................................... 7
Intended Audience ................................................................................................................... 7
Consensus Guidance .............................................................................................................. 8
Typographical Conventions .................................................................................................... 9
Recommendation Definitions ..................................................................................... 10
Title .......................................................................................................................................... 10
Assessment Status ................................................................................................................ 10
Automated ........................................................................................................................................... 10
Manual .................................................................................................................................................. 10
Profile ...................................................................................................................................... 10
Description ............................................................................................................................. 10
Rationale Statement............................................................................................................... 10
Impact Statement ................................................................................................................... 11
Audit Procedure ..................................................................................................................... 11
Remediation Procedure ......................................................................................................... 11
Default Value .......................................................................................................................... 11
References .............................................................................................................................. 11
CIS Critical Security Controls® (CIS Controls®) .................................................................. 11
Additional Information ........................................................................................................... 11
Profile Definitions .................................................................................................................. 12
Acknowledgements ............................................................................................................... 13
Recommendations ....................................................................................................... 15
1 Control Plane Components ................................................................................................ 15
1.1 Control Plane Node Configuration Files ..................................................................................... 16
1.1.1 Ensure that the API server pod specification file permissions are set to 600 or more restrictive
(Automated) ................................................................................................................................................. 17
1.1.2 Ensure that the API server pod specification file ownership is set to root:root (Automated) .............. 19
1.1.3 Ensure that the controller manager pod specification file permissions are set to 600 or more
restrictive (Automated) ................................................................................................................................ 21
1.1.4 Ensure that the controller manager pod specification file ownership is set to root:root (Automated) . 23
1.1.5 Ensure that the scheduler pod specification file permissions are set to 600 or more restrictive
(Automated) ................................................................................................................................................. 25
1.1.6 Ensure that the scheduler pod specification file ownership is set to root:root (Automated) ............... 27
1.1.7 Ensure that the etcd pod specification file permissions are set to 600 or more restrictive (Automated)
..................................................................................................................................................................... 29
Page 2
1.1.8 Ensure that the etcd pod specification file ownership is set to root:root (Automated) ........................ 31
1.1.9 Ensure that the Container Network Interface file permissions are set to 600 or more restrictive
(Manual) ...................................................................................................................................................... 33
1.1.10 Ensure that the Container Network Interface file ownership is set to root:root (Manual) ................. 35
1.1.11 Ensure that the etcd data directory permissions are set to 700 or more restrictive (Automated) ..... 37
1.1.12 Ensure that the etcd data directory ownership is set to etcd:etcd (Automated) ............................... 39
1.1.13 Ensure that the admin.conf file permissions are set to 600 (Automated) ......................................... 41
1.1.14 Ensure that the admin.conf file ownership is set to root:root (Automated) ....................................... 43
1.1.15 Ensure that the scheduler.conf file permissions are set to 600 or more restrictive (Automated) ..... 45
1.1.16 Ensure that the scheduler.conf file ownership is set to root:root (Automated) ................................. 47
1.1.17 Ensure that the controller-manager.conf file permissions are set to 600 or more restrictive
(Automated) ................................................................................................................................................. 49
1.1.18 Ensure that the controller-manager.conf file ownership is set to root:root (Automated)................... 51
1.1.19 Ensure that the Kubernetes PKI directory and file ownership is set to root:root (Automated).......... 53
1.1.20 Ensure that the Kubernetes PKI certificate file permissions are set to 600 or more restrictive
(Manual) ...................................................................................................................................................... 55
1.1.21 Ensure that the Kubernetes PKI key file permissions are set to 600 (Manual) ................................ 57
1.2 API Server ...................................................................................................................................... 59
1.2.1 Ensure that the --anonymous-auth argument is set to false (Manual)................................................ 60
1.2.2 Ensure that the --token-auth-file parameter is not set (Automated) ................................................... 62
1.2.3 Ensure that the DenyServiceExternalIPs is set (Manual) ................................................................... 64
1.2.4 Ensure that the --kubelet-client-certificate and --kubelet-client-key arguments are set as appropriate
(Automated) ................................................................................................................................................. 66
1.2.5 Ensure that the --kubelet-certificate-authority argument is set as appropriate (Automated) .............. 68
1.2.6 Ensure that the --authorization-mode argument is not set to AlwaysAllow (Automated).................... 70
1.2.7 Ensure that the --authorization-mode argument includes Node (Automated) .................................... 72
1.2.8 Ensure that the --authorization-mode argument includes RBAC (Automated) ................................... 74
1.2.9 Ensure that the admission control plugin EventRateLimit is set (Manual).......................................... 76
1.2.10 Ensure that the admission control plugin AlwaysAdmit is not set (Automated) ................................ 78
1.2.11 Ensure that the admission control plugin AlwaysPullImages is set (Manual) ................................... 80
1.2.12 Ensure that the admission control plugin SecurityContextDeny is set if PodSecurityPolicy is not
used (Manual).............................................................................................................................................. 82
1.2.13 Ensure that the admission control plugin ServiceAccount is set (Automated) ................................. 84
1.2.14 Ensure that the admission control plugin NamespaceLifecycle is set (Automated) ......................... 86
1.2.15 Ensure that the admission control plugin NodeRestriction is set (Automated) ................................. 88
1.2.16 Ensure that the --secure-port argument is not set to 0 - NoteThis recommendation is obsolete and
will be deleted per the consensus process. (Manual).................................................................................. 90
1.2.17 Ensure that the --profiling argument is set to false (Automated) ...................................................... 92
1.2.18 Ensure that the --audit-log-path argument is set (Automated) ......................................................... 94
1.2.19 Ensure that the --audit-log-maxage argument is set to 30 or as appropriate (Automated) .............. 96
1.2.20 Ensure that the --audit-log-maxbackup argument is set to 10 or as appropriate (Automated) ......... 98
1.2.21 Ensure that the --audit-log-maxsize argument is set to 100 or as appropriate (Automated) .......... 100
1.2.22 Ensure that the --request-timeout argument is set as appropriate (Manual) .................................. 102
1.2.23 Ensure that the --service-account-lookup argument is set to true (Automated) ............................. 104
1.2.24 Ensure that the --service-account-key-file argument is set as appropriate (Automated)................ 106
1.2.25 Ensure that the --etcd-certfile and --etcd-keyfile arguments are set as appropriate (Automated) .. 108
1.2.26 Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Automated)
................................................................................................................................................................... 110
1.2.27 Ensure that the --client-ca-file argument is set as appropriate (Automated) .................................. 112
1.2.28 Ensure that the --etcd-cafile argument is set as appropriate (Automated) ..................................... 114
1.2.29 Ensure that the --encryption-provider-config argument is set as appropriate (Manual) ................. 116
1.2.30 Ensure that encryption providers are appropriately configured (Manual) ....................................... 118
1.2.31 Ensure that the API Server only makes use of Strong Cryptographic Ciphers (Manual) ............... 120
Page 3
1.3 Controller Manager ..................................................................................................................... 122
1.3.1 Ensure that the --terminated-pod-gc-threshold argument is set as appropriate (Manual) ................ 123
1.3.2 Ensure that the --profiling argument is set to false (Automated) ...................................................... 125
1.3.3 Ensure that the --use-service-account-credentials argument is set to true (Automated) ................. 127
1.3.4 Ensure that the --service-account-private-key-file argument is set as appropriate (Automated)...... 129
1.3.5 Ensure that the --root-ca-file argument is set as appropriate (Automated) ...................................... 131
1.3.6 Ensure that the RotateKubeletServerCertificate argument is set to true (Automated) ..................... 133
1.3.7 Ensure that the --bind-address argument is set to 127.0.0.1 (Automated)....................................... 135
1.4 Scheduler ..................................................................................................................................... 137
1.4.1 Ensure that the --profiling argument is set to false (Automated) ...................................................... 138
1.4.2 Ensure that the --bind-address argument is set to 127.0.0.1 (Automated)....................................... 140
2 etcd ..................................................................................................................................... 142
2.1 Ensure that the --cert-file and --key-file arguments are set as appropriate (Automated) .................... 143
2.2 Ensure that the --client-cert-auth argument is set to true (Automated) ............................................... 145
2.3 Ensure that the --auto-tls argument is not set to true (Automated) ..................................................... 147
2.4 Ensure that the --peer-cert-file and --peer-key-file arguments are set as appropriate (Automated).... 149
2.5 Ensure that the --peer-client-cert-auth argument is set to true (Automated) ....................................... 151
2.6 Ensure that the --peer-auto-tls argument is not set to true (Automated) ............................................. 153
2.7 Ensure that a unique Certificate Authority is used for etcd (Manual) .................................................. 155
3 Control Plane Configuration ............................................................................................ 156
3.1 Authentication and Authorization ............................................................................................. 157
3.1.1 Client certificate authentication should not be used for users (Manual) ........................................... 158
3.1.2 Service account token authentication should not be used for users (Manual) ................................. 160
3.1.3 Bootstrap token authentication should not be used for users (Manual) ........................................... 162
3.2 Logging ........................................................................................................................................ 164
3.2.1 Ensure that a minimal audit policy is created (Manual) .................................................................... 165
3.2.2 Ensure that the audit policy covers key security concerns (Manual) ................................................ 167
Page 4
4.2.8 Ensure that the eventRecordQPS argument is set to a level which ensures appropriate event capture
(Manual) .................................................................................................................................................... 205
4.2.9 Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Manual) . 207
4.2.10 Ensure that the --rotate-certificates argument is not set to false (Automated) ............................... 209
4.2.11 Verify that the RotateKubeletServerCertificate argument is set to true (Manual) ........................... 211
4.2.12 Ensure that the Kubelet only makes use of Strong Cryptographic Ciphers (Manual) .................... 213
4.2.13 Ensure that a limit is set on pod PIDs (Manual) ............................................................................. 216
5 Policies............................................................................................................................... 216
5.1 RBAC and Service Accounts ..................................................................................................... 217
5.1.1 Ensure that the cluster-admin role is only used where required (Manual) ....................................... 218
5.1.2 Minimize access to secrets (Manual) ............................................................................................... 220
5.1.3 Minimize wildcard use in Roles and ClusterRoles (Manual)............................................................. 222
5.1.4 Minimize access to create pods (Manual) ........................................................................................ 224
5.1.5 Ensure that default service accounts are not actively used. (Manual) ............................................. 226
5.1.6 Ensure that Service Account Tokens are only mounted where necessary (Manual) ....................... 228
5.1.7 Avoid use of system:masters group (Manual) .................................................................................. 230
5.1.8 Limit use of the Bind, Impersonate and Escalate permissions in the Kubernetes cluster (Manual) . 232
5.1.9 Minimize access to create persistent volumes (Manual) .................................................................. 234
5.1.10 Minimize access to the proxy sub-resource of nodes (Manual) ..................................................... 235
5.1.11 Minimize access to the approval sub-resource of certificatesigningrequests objects (Manual) ..... 237
5.1.12 Minimize access to webhook configuration objects (Manual)......................................................... 239
5.1.13 Minimize access to the service account token creation (Manual) .................................................. 240
5.2 Pod Security Standards .............................................................................................................. 241
5.2.1 Ensure that the cluster has at least one active policy control mechanism in place (Manual) ........... 242
5.2.2 Minimize the admission of privileged containers (Manual) ............................................................... 243
5.2.3 Minimize the admission of containers wishing to share the host process ID namespace (Automated)
................................................................................................................................................................... 245
5.2.4 Minimize the admission of containers wishing to share the host IPC namespace (Automated) ...... 247
5.2.5 Minimize the admission of containers wishing to share the host network namespace (Automated) 249
5.2.6 Minimize the admission of containers with allowPrivilegeEscalation (Automated) ........................... 251
5.2.7 Minimize the admission of root containers (Automated)................................................................... 253
5.2.8 Minimize the admission of containers with the NET_RAW capability (Automated) .......................... 255
5.2.9 Minimize the admission of containers with added capabilities (Automated)..................................... 257
5.2.10 Minimize the admission of containers with capabilities assigned (Manual) .................................... 259
5.2.11 Minimize the admission of Windows HostProcess Containers (Manual)........................................ 261
5.2.12 Minimize the admission of HostPath volumes (Manual) ................................................................. 262
5.2.13 Minimize the admission of containers which use HostPorts (Manual)............................................ 263
5.3 Network Policies and CNI ........................................................................................................... 264
5.3.1 Ensure that the CNI in use supports Network Policies (Manual) ...................................................... 265
5.3.2 Ensure that all Namespaces have Network Policies defined (Manual) ............................................ 267
5.4 Secrets Management .................................................................................................................. 269
5.4.1 Prefer using secrets as files over secrets as environment variables (Manual)................................. 270
5.4.2 Consider external secret storage (Manual) ...................................................................................... 272
5.5 Extensible Admission Control ................................................................................................... 273
5.5.1 Configure Image Provenance using ImagePolicyWebhook admission controller (Manual) ............. 274
5.7 General Policies .......................................................................................................................... 276
5.7.1 Create administrative boundaries between resources using namespaces (Manual) ....................... 277
5.7.2 Ensure that the seccomp profile is set to docker/default in your pod definitions (Manual) ............... 279
5.7.3 Apply Security Context to Your Pods and Containers (Manual) ....................................................... 281
5.7.4 The default namespace should not be used (Manual) ..................................................................... 283
Page 5
Appendix: Change History ........................................................................................ 328
Page 6
Overview
All CIS Benchmarks focus on technical configuration settings used to maintain and/or
increase the security of the addressed technology, and they should be used in
conjunction with other essential cyber hygiene tasks like:
• Monitoring the base operating system for vulnerabilities and quickly updating with
the latest security patches
• Monitoring applications and libraries for vulnerabilities and quickly updating with
the latest security patches
In the end, the CIS Benchmarks are designed as a key component of a comprehensive
cybersecurity program.
Intended Audience
This document is intended for system and application administrators, security
specialists, auditors, help desk, and platform deployment personnel who plan to
develop, deploy, assess, or secure solutions that incorporate Kubernetes v1.25.
Page 7
Consensus Guidance
This CIS Benchmark was created using a consensus review process comprised of a
global community of subject matter experts. The process combines real world
experience with data-based information to create technology specific guidance to assist
users to secure their environments. Consensus participants provide perspective from a
diverse set of backgrounds including consulting, software development, audit and
compliance, security research, operations, government, and legal.
Each CIS Benchmark undergoes two phases of consensus review. The first phase
occurs during initial Benchmark development. During this phase, subject matter experts
convene to discuss, create, and test working drafts of the Benchmark. This discussion
occurs until consensus has been reached on Benchmark recommendations. The
second phase begins after the Benchmark has been published. During this phase, all
feedback provided by the Internet community is reviewed by the consensus team for
incorporation in the Benchmark. If you are interested in participating in the consensus
process, please visit https://workbench.cisecurity.org/.
Page 8
Typographical Conventions
The following typographical conventions are used throughout this guide:
Convention Meaning
Page 9
Recommendation Definitions
The following defines the various components included in a CIS recommendation as
applicable. If any of the components are not applicable it will be noted or the
component will not be included in the recommendation.
Title
Concise description for the recommendation's intended configuration.
Assessment Status
An assessment status is included for every recommendation. The assessment status
indicates whether the given recommendation can be automated or requires manual
steps to implement. Both statuses are equally important and are determined and
supported as defined below:
Automated
Represents recommendations for which assessment of a technical control can be fully
automated and validated to a pass/fail state. Recommendations will include the
necessary information to implement automation.
Manual
Represents recommendations for which assessment of a technical control cannot be
fully automated and requires all or some manual steps to validate that the configured
state is set as expected. The expected state can vary depending on the environment.
Profile
A collection of recommendations for securing a technology or a supporting platform.
Most benchmarks include at least a Level 1 and Level 2 Profile. Level 2 extends Level 1
recommendations and is not a standalone profile. The Profile Definitions section in the
benchmark provides the definitions as they pertain to the recommendations included for
the technology.
Description
Detailed information pertaining to the setting with which the recommendation is
concerned. In some cases, the description will include the recommended value.
Rationale Statement
Detailed reasoning for the recommendation to provide the user a clear and concise
understanding on the importance of the recommendation.
Page 10
Impact Statement
Any security, functionality, or operational consequences that can result from following
the recommendation.
Audit Procedure
Systematic instructions for determining if the target system complies with the
recommendation
Remediation Procedure
Systematic instructions for applying recommendations to the target system to bring it
into compliance according to the recommendation.
Default Value
Default value for the given setting in this recommendation, if known. If not known, either
not configured or not defined will be applied.
References
Additional documentation relative to the recommendation.
Additional Information
Supplementary information that does not correspond to any other field but may be
useful to the user.
Page 11
Profile Definitions
The following configuration profiles are defined by this Benchmark:
Page 12
Acknowledgements
This Benchmark exemplifies the great things a community of users, vendors, and
subject matter experts can accomplish through consensus collaboration. The CIS
community thanks the entire consensus team with special recognition to the following
individuals who contributed greatly to the creation of this guide:
This benchmark exemplifies the great things a community of users, vendors, and
subject matter experts can accomplish through consensus collaboration. The CIS
community thanks the entire consensus team with special recognition to the following
individuals who contributed greatly to the creation of this guide:
Authors
Rory McCune
Liz Rice
Editor
Randall Mowen
Contributors
Randall Mowen
Joe Bowbeer
Pravin Goyal
Prabhu Angadi
Jordan Liggitt
Eric Chiang
Jordan Rakoske
Sara Archacki
Maya Kaczorowski
Andrew Martin
Mark Larinde
Rory Mccune
Thierry Agassis
Page 13
Page 14
Recommendations
1 Control Plane Components
This section consists of security recommendations for the direct configuration of
Kubernetes control plane processes. These recommendations may not be directly
applicable for cluster operators in environments where these components are managed
by a 3rd party.
Page 15
1.1 Control Plane Node Configuration Files
Page 16
1.1.1 Ensure that the API server pod specification file permissions
are set to 600 or more restrictive (Automated)
Profile Applicability:
Default Value:
By default, the kube-apiserver.yaml file has permissions of 640.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
Page 17
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 18
1.1.2 Ensure that the API server pod specification file ownership
is set to root:root (Automated)
Profile Applicability:
Rationale:
The API server pod specification file controls various parameters that set the behavior
of the API server. You should set its file ownership to maintain the integrity of the file.
The file should be owned by root:root.
Impact:
None
Audit:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
stat -c %U:%G /etc/kubernetes/manifests/kube-apiserver.yaml
Verify that the ownership is set to root:root.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chown root:root /etc/kubernetes/manifests/kube-apiserver.yaml
Default Value:
By default, the kube-apiserver.yaml file ownership is set to root:root.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
Page 19
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 20
1.1.3 Ensure that the controller manager pod specification file
permissions are set to 600 or more restrictive (Automated)
Profile Applicability:
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chmod 600 /etc/kubernetes/manifests/kube-controller-manager.yaml
Default Value:
By default, the kube-controller-manager.yaml file has permissions of 640.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
Page 21
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 22
1.1.4 Ensure that the controller manager pod specification file
ownership is set to root:root (Automated)
Profile Applicability:
Rationale:
The controller manager pod specification file controls various parameters that set the
behavior of various components of the master node. You should set its file ownership to
maintain the integrity of the file. The file should be owned by root:root.
Impact:
None
Audit:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
stat -c %U:%G /etc/kubernetes/manifests/kube-controller-manager.yaml
Verify that the ownership is set to root:root.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chown root:root /etc/kubernetes/manifests/kube-controller-manager.yaml
Default Value:
By default, kube-controller-manager.yaml file ownership is set to root:root.
References:
1. https://kubernetes.io/docs/admin/kube-controller-manager
Page 23
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 24
1.1.5 Ensure that the scheduler pod specification file permissions
are set to 600 or more restrictive (Automated)
Profile Applicability:
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chmod 600 /etc/kubernetes/manifests/kube-scheduler.yaml
Default Value:
By default, kube-scheduler.yaml file has permissions of 640.
References:
1. https://kubernetes.io/docs/admin/kube-scheduler/
Page 25
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 26
1.1.6 Ensure that the scheduler pod specification file ownership is
set to root:root (Automated)
Profile Applicability:
Rationale:
The scheduler pod specification file controls various parameters that set the behavior of
the kube-scheduler service in the master node. You should set its file ownership to
maintain the integrity of the file. The file should be owned by root:root.
Impact:
None
Audit:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
stat -c %U:%G /etc/kubernetes/manifests/kube-scheduler.yaml
Verify that the ownership is set to root:root.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chown root:root /etc/kubernetes/manifests/kube-scheduler.yaml
Default Value:
By default, kube-scheduler.yaml file ownership is set to root:root.
References:
1. https://kubernetes.io/docs/admin/kube-scheduler/
Page 27
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 28
1.1.7 Ensure that the etcd pod specification file permissions are
set to 600 or more restrictive (Automated)
Profile Applicability:
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chmod 600 /etc/kubernetes/manifests/etcd.yaml
Default Value:
By default, /etc/kubernetes/manifests/etcd.yaml file has permissions of 640.
References:
1. https://coreos.com/etcd
2. https://kubernetes.io/docs/admin/etcd/
Page 29
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 30
1.1.8 Ensure that the etcd pod specification file ownership is set
to root:root (Automated)
Profile Applicability:
Rationale:
The etcd pod specification file /etc/kubernetes/manifests/etcd.yaml controls various
parameters that set the behavior of the etcd service in the master node. etcd is a highly-
available key-value store which Kubernetes uses for persistent storage of all of its
REST API object. You should set its file ownership to maintain the integrity of the file.
The file should be owned by root:root.
Impact:
None
Audit:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
stat -c %U:%G /etc/kubernetes/manifests/etcd.yaml
Verify that the ownership is set to root:root.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chown root:root /etc/kubernetes/manifests/etcd.yaml
Default Value:
By default, /etc/kubernetes/manifests/etcd.yaml file ownership is set to root:root.
References:
1. https://coreos.com/etcd
2. https://kubernetes.io/docs/admin/etcd/
Page 31
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 32
1.1.9 Ensure that the Container Network Interface file permissions
are set to 600 or more restrictive (Manual)
Profile Applicability:
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chmod 600 <path/to/cni/files>
Default Value:
NA
References:
1. https://kubernetes.io/docs/concepts/cluster-administration/networking/
Page 33
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 34
1.1.10 Ensure that the Container Network Interface file ownership
is set to root:root (Manual)
Profile Applicability:
Rationale:
Container Network Interface provides various networking options for overlay networking.
You should consult their documentation and restrict their respective file permissions to
maintain the integrity of those files. Those files should be owned by root:root.
Impact:
None
Audit:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
stat -c %U:%G <path/to/cni/files>
Verify that the ownership is set to root:root.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chown root:root <path/to/cni/files>
Default Value:
NA
References:
1. https://kubernetes.io/docs/concepts/cluster-administration/networking/
Page 35
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 36
1.1.11 Ensure that the etcd data directory permissions are set to
700 or more restrictive (Automated)
Profile Applicability:
Rationale:
etcd is a highly-available key-value store used by Kubernetes deployments for
persistent storage of all of its REST API objects. This data directory should be protected
from any unauthorized reads or writes. It should not be readable or writable by any
group members or the world.
Impact:
None
Audit:
On the etcd server node, get the etcd data directory, passed as an argument --data-
dir, from the below command:
Default Value:
By default, etcd data directory has permissions of 755.
References:
1. https://coreos.com/etcd/docs/latest/op-guide/configuration.html#data-dir
Page 37
2. https://kubernetes.io/docs/admin/etcd/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 38
1.1.12 Ensure that the etcd data directory ownership is set to
etcd:etcd (Automated)
Profile Applicability:
Rationale:
etcd is a highly-available key-value store used by Kubernetes deployments for
persistent storage of all of its REST API objects. This data directory should be protected
from any unauthorized reads or writes. It should be owned by etcd:etcd.
Impact:
None
Audit:
On the etcd server node, get the etcd data directory, passed as an argument --data-
dir, from the below command:
Default Value:
By default, etcd data directory ownership is set to etcd:etcd.
References:
1. https://coreos.com/etcd/docs/latest/op-guide/configuration.html#data-dir
2. https://kubernetes.io/docs/admin/etcd/
Page 39
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 40
1.1.13 Ensure that the admin.conf file permissions are set to 600
(Automated)
Profile Applicability:
Rationale:
The admin.conf is the administrator kubeconfig file defining various settings for the
administration of the cluster. This file contains private key and respective certificate
allowed to fully manage the cluster. You should restrict its file permissions to maintain
the integrity and confidentiality of the file. The file should be readable and writable by
only the administrators on the system.
Impact:
None.
Audit:
Run the following command (based on the file location on your system) on the Control
Plane node. For example,
stat -c %a /etc/kubernetes/admin.conf
Verify that the permissions are 600 or more restrictive.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chmod 600 /etc/kubernetes/admin.conf
Default Value:
By default, admin.conf has permissions of 600.
References:
1. https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/
Page 41
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 42
1.1.14 Ensure that the admin.conf file ownership is set to root:root
(Automated)
Profile Applicability:
Rationale:
The admin.conf file contains the admin credentials for the cluster. You should set its file
ownership to maintain the integrity and confidentiality of the file. The file should be
owned by root:root.
Impact:
None.
Audit:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
stat -c %U:%G /etc/kubernetes/admin.conf
Verify that the ownership is set to root:root.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chown root:root /etc/kubernetes/admin.conf
Default Value:
By default, admin.conf file ownership is set to root:root.
References:
1. https://kubernetes.io/docs/admin/kubeadm/
Page 43
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 44
1.1.15 Ensure that the scheduler.conf file permissions are set to
600 or more restrictive (Automated)
Profile Applicability:
Rationale:
The scheduler.conf file is the kubeconfig file for the Scheduler. You should restrict its
file permissions to maintain the integrity of the file. The file should be writable by only
the administrators on the system.
Impact:
None
Audit:
Run the following command (based on the file location on your system) on the Control
Plane node. For example,
stat -c %a /etc/kubernetes/scheduler.conf
Verify that the permissions are 600 or more restrictive.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chmod 600 /etc/kubernetes/scheduler.conf
Default Value:
By default, scheduler.conf has permissions of 640.
References:
1. https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/
Page 45
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 46
1.1.16 Ensure that the scheduler.conf file ownership is set to
root:root (Automated)
Profile Applicability:
Rationale:
The scheduler.conf file is the kubeconfig file for the Scheduler. You should set its file
ownership to maintain the integrity of the file. The file should be owned by root:root.
Impact:
None
Audit:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
stat -c %U:%G /etc/kubernetes/scheduler.conf
Verify that the ownership is set to root:root.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chown root:root /etc/kubernetes/scheduler.conf
Default Value:
By default, scheduler.conf file ownership is set to root:root.
References:
1. https://kubernetes.io/docs/admin/kubeadm/
Page 47
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 48
1.1.17 Ensure that the controller-manager.conf file permissions
are set to 600 or more restrictive (Automated)
Profile Applicability:
Default Value:
By default, controller-manager.conf has permissions of 640.
References:
1. https://kubernetes.io/docs/admin/kube-controller-manager/
Page 49
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 50
1.1.18 Ensure that the controller-manager.conf file ownership is
set to root:root (Automated)
Profile Applicability:
Rationale:
The controller-manager.conf file is the kubeconfig file for the Controller Manager. You
should set its file ownership to maintain the integrity of the file. The file should be owned
by root:root.
Impact:
None
Audit:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
stat -c %U:%G /etc/kubernetes/controller-manager.conf
Verify that the ownership is set to root:root.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chown root:root /etc/kubernetes/controller-manager.conf
Default Value:
By default, controller-manager.conf file ownership is set to root:root.
References:
1. https://kubernetes.io/docs/admin/kube-controller-manager/
Page 51
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 52
1.1.19 Ensure that the Kubernetes PKI directory and file
ownership is set to root:root (Automated)
Profile Applicability:
Rationale:
Kubernetes makes use of a number of certificates as part of its operation. You should
set the ownership of the directory containing the PKI information and all files in that
directory to maintain their integrity. The directory and files should be owned by
root:root.
Impact:
None
Audit:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
ls -laR /etc/kubernetes/pki/
Verify that the ownership of all files and directories in this hierarchy is set to root:root.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chown -R root:root /etc/kubernetes/pki/
Default Value:
By default, the /etc/kubernetes/pki/ directory and all of the files and directories contained
within it, are set to be owned by the root user.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
Page 53
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 54
1.1.20 Ensure that the Kubernetes PKI certificate file permissions
are set to 600 or more restrictive (Manual)
Profile Applicability:
Rationale:
Kubernetes makes use of a number of certificate files as part of the operation of its
components. The permissions on these files should be set to 600 or more restrictive to
protect their integrity.
Impact:
None
Audit:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
ls -laR /etc/kubernetes/pki/*.crt
Verify that the permissions are 600 or more restrictive.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chmod -R 600 /etc/kubernetes/pki/*.crt
Default Value:
By default, the certificates used by Kubernetes are set to have permissions of 644
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
Page 55
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 56
1.1.21 Ensure that the Kubernetes PKI key file permissions are
set to 600 (Manual)
Profile Applicability:
Rationale:
Kubernetes makes use of a number of key files as part of the operation of its
components. The permissions on these files should be set to 600 to protect their
integrity and confidentiality.
Impact:
None
Audit:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
ls -laR /etc/kubernetes/pki/*.key
Verify that the permissions are 600.
Remediation:
Run the below command (based on the file location on your system) on the Control
Plane node. For example,
chmod -R 600 /etc/kubernetes/pki/*.key
Default Value:
By default, the keys used by Kubernetes are set to have permissions of 600
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
Page 57
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 58
1.2 API Server
Page 59
1.2.1 Ensure that the --anonymous-auth argument is set to false
(Manual)
Profile Applicability:
When enabled, requests that are not rejected by other configured authentication
methods are treated as anonymous requests. These requests are then served by the
API server. You should rely on authentication to authorize access and disallow
anonymous requests.
If you are using RBAC authorization, it is generally considered reasonable to allow
anonymous access to the API Server for health checks and discovery purposes, and
hence this recommendation is not scored. However, you should consider whether
anonymous discovery is an acceptable risk for your purposes.
Impact:
Anonymous requests will be rejected.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --anonymous-auth argument is set to false.
Alternative Audit
kubectl get pod -nkube-system -lcomponent=kube-apiserver -o=jsonpath='{range
.items[]}{.spec.containers[].command} {"\n"}{end}' | grep '--anonymous-auth' | grep -i
false
If the exit code is '1', then the control isn't present / failed
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the below parameter.
--anonymous-auth=false
Default Value:
By default, anonymous access is enabled.
Page 60
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/admin/authentication/#anonymous-requests
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 61
1.2.2 Ensure that the --token-auth-file parameter is not set
(Automated)
Profile Applicability:
References:
1. https://kubernetes.io/docs/admin/authentication/#static-token-file
2. https://kubernetes.io/docs/admin/kube-apiserver/
Page 62
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 63
1.2.3 Ensure that the DenyServiceExternalIPs is set (Manual)
Profile Applicability:
Default Value:
By default, --disable-admission-plugins=DenyServiceExternalIP argument is not set.
References:
1. https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/
2. https://kubernetes.io/docs/admin/kube-apiserver/
Page 64
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 65
1.2.4 Ensure that the --kubelet-client-certificate and --kubelet-
client-key arguments are set as appropriate (Automated)
Profile Applicability:
The apiserver, by default, does not authenticate itself to the kubelet's HTTPS endpoints.
The requests from the apiserver are treated anonymously. You should set up certificate-
based kubelet authentication to ensure that the apiserver authenticates itself to kubelets
when submitting requests.
Impact:
You require TLS to be configured on apiserver as well as kubelets.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --kubelet-client-certificate and --kubelet-client-key arguments
exist and they are set as appropriate.
Alternative Audit
kubectl get pod -nkube-system -lcomponent=kube-apiserver -o=jsonpath='{range
.items[]}{.spec.containers[].command} {"\n"}{end}' | grep '--kubelet-client-certificate' |
grep -i false
If the exit code is '1', then the control isn't present / failed
Remediation:
Follow the Kubernetes documentation and set up the TLS connection between the
apiserver and kubelets. Then, edit API server pod specification file
/etc/kubernetes/manifests/kube-apiserver.yaml on the Control Plane node and set
the kubelet client certificate and key parameters as below.
--kubelet-client-certificate=<path/to/client-certificate-file>
--kubelet-client-key=<path/to/client-key-file>
Default Value:
By default, certificate-based kubelet authentication is not set.
Page 66
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/admin/kubelet-authentication-authorization/
3. https://kubernetes.io/docs/concepts/cluster-administration/master-node-
communication/#apiserver---kubelet
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 67
1.2.5 Ensure that the --kubelet-certificate-authority argument is
set as appropriate (Automated)
Profile Applicability:
The connections from the apiserver to the kubelet are used for fetching logs for pods,
attaching (through kubectl) to running pods, and using the kubelet’s port-forwarding
functionality. These connections terminate at the kubelet’s HTTPS endpoint. By default,
the apiserver does not verify the kubelet’s serving certificate, which makes the
connection subject to man-in-the-middle attacks, and unsafe to run over untrusted
and/or public networks.
Impact:
You require TLS to be configured on apiserver as well as kubelets.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --kubelet-certificate-authority argument exists and is set as
appropriate.
Alternative Audit
kubectl get pod -nkube-system -lcomponent=kube-apiserver -o=jsonpath='{range
.items[]}{.spec.containers[].command} {"\n"}{end}' | grep '--kubelet-certificate-Authority' |
grep -i false
If the exit code is '1', then the control isn't present / failed
Remediation:
Follow the Kubernetes documentation and setup the TLS connection between the
apiserver and kubelets. Then, edit the API server pod specification file
/etc/kubernetes/manifests/kube-apiserver.yaml on the Control Plane node and set
the --kubelet-certificate-authority parameter to the path to the cert file for the
certificate authority.
--kubelet-certificate-authority=<ca-string>
Default Value:
By default, --kubelet-certificate-authority argument is not set.
Page 68
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/admin/kubelet-authentication-authorization/
3. https://kubernetes.io/docs/concepts/cluster-administration/master-node-
communication/#apiserver---kubelet
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 69
1.2.6 Ensure that the --authorization-mode argument is not set to
AlwaysAllow (Automated)
Profile Applicability:
The API Server, can be configured to allow all requests. This mode should not be used
on any production cluster.
Impact:
Only authorized requests will be served.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --authorization-mode argument exists and is not set to AlwaysAllow.
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the --authorization-mode
parameter to values other than AlwaysAllow. One such example could be as below.
--authorization-mode=RBAC
Default Value:
By default, AlwaysAllow is not enabled.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/admin/authorization/
Page 70
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 71
1.2.7 Ensure that the --authorization-mode argument includes
Node (Automated)
Profile Applicability:
The Node authorization mode only allows kubelets to read Secret, ConfigMap,
PersistentVolume, and PersistentVolumeClaim objects associated with their nodes.
Impact:
None
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --authorization-mode argument exists and is set to a value to include
Node.
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the --authorization-mode
parameter to a value that includes Node.
--authorization-mode=Node,RBAC
Default Value:
By default, Node authorization is not enabled.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/admin/authorization/node/
3. https://github.com/kubernetes/kubernetes/pull/46076
4. https://acotten.com/post/kube17-security
Page 72
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 73
1.2.8 Ensure that the --authorization-mode argument includes
RBAC (Automated)
Profile Applicability:
Role Based Access Control (RBAC) allows fine-grained control over the operations that
different entities can perform on different objects in the cluster. It is recommended to
use the RBAC authorization mode.
Impact:
When RBAC is enabled you will need to ensure that appropriate RBAC settings
(including Roles, RoleBindings and ClusterRoleBindings) are configured to allow
appropriate access.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --authorization-mode argument exists and is set to a value to include
RBAC.
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the --authorization-mode
parameter to a value that includes RBAC, for example:
--authorization-mode=Node,RBAC
Default Value:
By default, RBAC authorization is not enabled.
References:
1. https://kubernetes.io/docs/reference/access-authn-authz/rbac/
Page 74
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 75
1.2.9 Ensure that the admission control plugin EventRateLimit is
set (Manual)
Profile Applicability:
Using EventRateLimit admission control enforces a limit on the number of events that
the API Server will accept in a given time slice. A misbehaving workload could
overwhelm and DoS the API Server, making it unavailable. This particularly applies to a
multi-tenant cluster, where there might be a small percentage of misbehaving tenants
which could have a significant impact on the performance of the cluster overall. Hence,
it is recommended to limit the rate of events that the API server will accept.
Note: This is an Alpha feature in the Kubernetes 1.15 release.
Impact:
You need to carefully tune in limits as per your environment.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --enable-admission-plugins argument is set to a value that includes
EventRateLimit.
Remediation:
Follow the Kubernetes documentation and set the desired limits in a configuration file.
Then, edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml and set the below parameters.
--enable-admission-plugins=...,EventRateLimit,...
--admission-control-config-file=<path/to/configuration/file>
Default Value:
By default, EventRateLimit is not set.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
Page 76
2. https://kubernetes.io/docs/admin/admission-controllers/#eventratelimit
3. https://github.com/staebler/community/blob/9873b632f4d99b5d99c38c9b15fe2f8
b93d0a746/contributors/design-
proposals/admission_control_event_rate_limit.md
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 77
1.2.10 Ensure that the admission control plugin AlwaysAdmit is
not set (Automated)
Profile Applicability:
Setting admission control plugin AlwaysAdmit allows all requests and do not filter any
requests.
The AlwaysAdmit admission controller was deprecated in Kubernetes v1.13. Its behavior
was equivalent to turning off all admission controllers.
Impact:
Only requests explicitly allowed by the admissions control plugins would be served.
Audit:
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and either remove the --enable-admission-
plugins parameter, or set it to a value that does not include AlwaysAdmit.
Default Value:
AlwaysAdmit is not in the list of default admission plugins.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/admin/admission-controllers/#alwaysadmit
Page 78
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 79
1.2.11 Ensure that the admission control plugin AlwaysPullImages
is set (Manual)
Profile Applicability:
Setting admission control policy to AlwaysPullImages forces every new pod to pull the
required images every time. In a multi-tenant cluster users can be assured that their
private images can only be used by those who have the credentials to pull them.
Without this admission control policy, once an image has been pulled to a node, any
pod from any user can use it simply by knowing the image’s name, without any
authorization check against the image ownership. When this plug-in is enabled, images
are always pulled prior to starting containers, which means valid credentials are
required.
Impact:
Credentials would be required to pull the private images every time. Also, in trusted
environments, this might increases load on network, registry, and decreases speed.
This setting could impact offline or isolated clusters, which have images pre-loaded and
do not have access to a registry to pull in-use images. This setting is not appropriate for
clusters which use this configuration.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --enable-admission-plugins argument is set to a value that includes
AlwaysPullImages.
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the --enable-admission-plugins
parameter to include AlwaysPullImages.
--enable-admission-plugins=...,AlwaysPullImages,...
Default Value:
By default, AlwaysPullImages is not set.
Page 80
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/admin/admission-controllers/#alwayspullimages
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 81
1.2.12 Ensure that the admission control plugin
SecurityContextDeny is set if PodSecurityPolicy is not used
(Manual)
Profile Applicability:
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the --enable-admission-plugins
parameter to include SecurityContextDeny, unless PodSecurityPolicy is already in
place.
--enable-admission-plugins=...,SecurityContextDeny,...
Default Value:
By default, SecurityContextDeny is not set.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/admin/admission-controllers/#securitycontextdeny
Page 82
3. https://kubernetes.io/docs/user-guide/pod-security-policy/#working-with-rbac
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 83
1.2.13 Ensure that the admission control plugin ServiceAccount is
set (Automated)
Profile Applicability:
When you create a pod, if you do not specify a service account, it is automatically
assigned the default service account in the same namespace. You should create your
own service account and let the API server manage its security tokens.
Impact:
None.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --disable-admission-plugins argument is set to a value that does not
includes ServiceAccount.
Remediation:
Follow the documentation and create ServiceAccount objects as per your environment.
Then, edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the master node and ensure that the --disable-admission-plugins
parameter is set to a value that does not include ServiceAccount.
Default Value:
By default, ServiceAccount is set.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/admin/admission-controllers/#serviceaccount
3. https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-
account/
Page 84
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 85
1.2.14 Ensure that the admission control plugin
NamespaceLifecycle is set (Automated)
Profile Applicability:
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the --disable-admission-plugins
parameter to ensure it does not include NamespaceLifecycle.
Default Value:
By default, NamespaceLifecycle is set.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/admin/admission-controllers/#namespacelifecycle
Page 86
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 87
1.2.15 Ensure that the admission control plugin NodeRestriction is
set (Automated)
Profile Applicability:
Rationale:
Using the NodeRestriction plug-in ensures that the kubelet is restricted to the Node and
Pod objects that it could modify as defined. Such kubelets will only be allowed to modify
their own Node API object, and only modify Pod API objects that are bound to their node.
Impact:
None
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --enable-admission-plugins argument is set to a value that includes
NodeRestriction.
Remediation:
Follow the Kubernetes documentation and configure NodeRestriction plug-in on
kubelets. Then, edit the API server pod specification file
/etc/kubernetes/manifests/kube-apiserver.yaml on the master node and set the --
enable-admission-plugins parameter to a value that includes NodeRestriction.
--enable-admission-plugins=...,NodeRestriction,...
Default Value:
By default, NodeRestriction is not set.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/admin/admission-controllers/#noderestriction
3. https://kubernetes.io/docs/admin/authorization/node/
4. https://acotten.com/post/kube17-security
Page 88
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 89
1.2.16 Ensure that the --secure-port argument is not set to 0 -
NoteThis recommendation is obsolete and will be deleted per the
consensus process. (Manual)
Profile Applicability:
The secure port is used to serve https with authentication and authorization. If you
disable it, no https traffic is served and all traffic is served unencrypted.
Impact:
You need to set the API Server up with the right TLS certificates.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --secure-port argument is either not set or is set to an integer value
between 1 and 65535.
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and either remove the --secure-port
parameter or set it to a different (non-zero) desired port.
Default Value:
1. https://kubernetes.io/docs/admin/kube-apiserver/
Page 90
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 91
1.2.17 Ensure that the --profiling argument is set to false
(Automated)
Profile Applicability:
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the below parameter.
--profiling=false
Default Value:
By default, profiling is enabled.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://github.com/kubernetes/community/blob/master/contributors/devel/profiling.
md
Page 92
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 93
1.2.18 Ensure that the --audit-log-path argument is set
(Automated)
Profile Applicability:
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the --audit-log-path parameter to
a suitable path and file where you would like audit logs to be written, for example:
--audit-log-path=/var/log/apiserver/audit.log
Default Value:
By default, auditing is not enabled.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/concepts/cluster-administration/audit/
3. https://github.com/kubernetes/features/issues/22
Page 94
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 95
1.2.19 Ensure that the --audit-log-maxage argument is set to 30
or as appropriate (Automated)
Profile Applicability:
Retaining logs for at least 30 days ensures that you can go back in time and investigate
or correlate any events. Set your audit log retention period to 30 days or as per your
business requirements.
Impact:
None
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --audit-log-maxage argument is set to 30 or as appropriate.
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the --audit-log-maxage parameter
to 30 or as an appropriate number of days:
--audit-log-maxage=30
Default Value:
By default, auditing is not enabled.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/concepts/cluster-administration/audit/
3. https://github.com/kubernetes/features/issues/22
Page 96
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 97
1.2.20 Ensure that the --audit-log-maxbackup argument is set to
10 or as appropriate (Automated)
Profile Applicability:
Kubernetes automatically rotates the log files. Retaining old log files ensures that you
would have sufficient log data available for carrying out any investigation or correlation.
For example, if you have set file size of 100 MB and the number of old log files to keep
as 10, you would approximate have 1 GB of log data that you could potentially use for
your analysis.
Impact:
None
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --audit-log-maxbackup argument is set to 10 or as appropriate.
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the --audit-log-maxbackup
parameter to 10 or to an appropriate value.
--audit-log-maxbackup=10
Default Value:
By default, auditing is not enabled.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/concepts/cluster-administration/audit/
3. https://github.com/kubernetes/features/issues/22
Page 98
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 99
1.2.21 Ensure that the --audit-log-maxsize argument is set to 100
or as appropriate (Automated)
Profile Applicability:
Kubernetes automatically rotates the log files. Retaining old log files ensures that you
would have sufficient log data available for carrying out any investigation or correlation.
If you have set file size of 100 MB and the number of old log files to keep as 10, you
would approximate have 1 GB of log data that you could potentially use for your
analysis.
Impact:
None
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --audit-log-maxsize argument is set to 100 or as appropriate.
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the --audit-log-maxsize parameter
to an appropriate size in MB. For example, to set it as 100 MB:
--audit-log-maxsize=100
Default Value:
By default, auditing is not enabled.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/concepts/cluster-administration/audit/
3. https://github.com/kubernetes/features/issues/22
Page 100
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 101
1.2.22 Ensure that the --request-timeout argument is set as
appropriate (Manual)
Profile Applicability:
Setting global request timeout allows extending the API server request timeout limit to a
duration appropriate to the user's connection speed. By default, it is set to 60 seconds
which might be problematic on slower connections making cluster resources
inaccessible once the data volume for requests exceeds what can be transmitted in 60
seconds. But, setting this timeout limit to be too large can exhaust the API server
resources making it prone to Denial-of-Service attack. Hence, it is recommended to set
this limit as appropriate and change the default limit of 60 seconds only if needed.
Impact:
None
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --request-timeout argument is either not set or set to an appropriate
value.
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml and set the below parameter as appropriate and if needed. For
example,
--request-timeout=300s
Default Value:
By default, --request-timeout is set to 60 seconds.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://github.com/kubernetes/kubernetes/pull/51415
Page 102
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 103
1.2.23 Ensure that the --service-account-lookup argument is set
to true (Automated)
Profile Applicability:
--service-account-lookup=true
Alternatively, you can delete the --service-account-lookup parameter from this file so
that the default takes effect.
Default Value:
By default, --service-account-lookup argument is set to true.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://github.com/kubernetes/kubernetes/issues/24167
3. https://en.wikipedia.org/wiki/Time_of_check_to_time_of_use
Page 104
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 105
1.2.24 Ensure that the --service-account-key-file argument is set
as appropriate (Automated)
Profile Applicability:
Impact:
The corresponding private key must be provided to the controller manager. You would
need to securely maintain the key file and rotate the keys based on your organization's
key rotation policy.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --service-account-key-file argument exists and is set as appropriate.
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the Control Plane node and set the --service-account-key-file
parameter to the public key file for service accounts:
--service-account-key-file=<filename>
Default Value:
By default, --service-account-key-file argument is not set.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://github.com/kubernetes/kubernetes/issues/24167
Page 106
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 107
1.2.25 Ensure that the --etcd-certfile and --etcd-keyfile arguments
are set as appropriate (Automated)
Profile Applicability:
Default Value:
By default, --etcd-certfile and --etcd-keyfile arguments are not set
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://coreos.com/etcd/docs/latest/op-guide/security.html
Page 108
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 109
1.2.26 Ensure that the --tls-cert-file and --tls-private-key-file
arguments are set as appropriate (Automated)
Profile Applicability:
API server communication contains sensitive parameters that should remain encrypted
in transit. Configure the API server to serve only HTTPS traffic.
Impact:
TLS and client certificate authentication must be configured for your Kubernetes cluster
deployment.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --tls-cert-file and --tls-private-key-file arguments exist and they
are set as appropriate.
Remediation:
Follow the Kubernetes documentation and set up the TLS connection on the apiserver.
Then, edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the master node and set the TLS certificate and private key file
parameters.
--tls-cert-file=<path/to/tls-certificate-file>
--tls-private-key-file=<path/to/tls-key-file>
Default Value:
By default, --tls-cert-file and --tls-private-key-file are presented and created
for use.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. http://rootsquash.com/2016/05/10/securing-the-kubernetes-api/
3. https://github.com/kelseyhightower/docker-kubernetes-tls-guide
Page 110
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 111
1.2.27 Ensure that the --client-ca-file argument is set as
appropriate (Automated)
Profile Applicability:
API server communication contains sensitive parameters that should remain encrypted
in transit. Configure the API server to serve only HTTPS traffic. If --client-ca-file
argument is set, any request presenting a client certificate signed by one of the
authorities in the client-ca-file is authenticated with an identity corresponding to the
CommonName of the client certificate.
Impact:
TLS and client certificate authentication must be configured for your Kubernetes cluster
deployment.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --client-ca-file argument exists and it is set as appropriate.
Remediation:
Follow the Kubernetes documentation and set up the TLS connection on the apiserver.
Then, edit the API server pod specification file /etc/kubernetes/manifests/kube-
apiserver.yaml on the master node and set the client certificate authority file.
--client-ca-file=<path/to/client-ca-file>
Default Value:
By default, --client-ca-file argument is not set.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. http://rootsquash.com/2016/05/10/securing-the-kubernetes-api/
3. https://github.com/kelseyhightower/docker-kubernetes-tls-guide
Page 112
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 113
1.2.28 Ensure that the --etcd-cafile argument is set as appropriate
(Automated)
Profile Applicability:
Remediation:
Follow the Kubernetes documentation and set up the TLS connection between the
apiserver and etcd. Then, edit the API server pod specification file
/etc/kubernetes/manifests/kube-apiserver.yaml on the master node and set the etcd
certificate authority file parameter.
--etcd-cafile=<path/to/ca-file>
Default Value:
By default, --etcd-cafile is not set.
References:
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://coreos.com/etcd/docs/latest/op-guide/security.html
Page 114
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 115
1.2.29 Ensure that the --encryption-provider-config argument is
set as appropriate (Manual)
Profile Applicability:
Default Value:
By default, --encryption-provider-config is not set.
References:
1. https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/
2. https://acotten.com/post/kube17-security
3. https://kubernetes.io/docs/admin/kube-apiserver/
4. https://github.com/kubernetes/features/issues/92
Page 116
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 117
1.2.30 Ensure that encryption providers are appropriately
configured (Manual)
Profile Applicability:
Rationale:
Where etcd encryption is used, it is important to ensure that the appropriate set of
encryption providers is used. Currently, the aescbc, kms and secretbox are likely to be
appropriate options.
Impact:
None
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Get the EncryptionConfig file set for --encryption-provider-config argument. Verify
that aescbc, kms or secretbox is set as the encryption provider for all the desired
resources.
Remediation:
Follow the Kubernetes documentation and configure a EncryptionConfig file. In this file,
choose aescbc, kms or secretbox as the encryption provider.
Default Value:
By default, no encryption provider is set.
References:
1. https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/
2. https://acotten.com/post/kube17-security
3. https://kubernetes.io/docs/admin/kube-apiserver/
4. https://github.com/kubernetes/features/issues/92
5. https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/#providers
Page 118
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 119
1.2.31 Ensure that the API Server only makes use of Strong
Cryptographic Ciphers (Manual)
Profile Applicability:
TLS ciphers have had a number of known vulnerabilities and weaknesses, which can
reduce the protection provided by them. By default Kubernetes supports a number of
TLS ciphersuites including some that have security concerns, weakening the protection
provided.
Impact:
API server clients that cannot support modern cryptographic ciphers will not be able to
make connections to the API server.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-apiserver
Verify that the --tls-cipher-suites argument is set as outlined in the remediation
procedure below.
Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml
on the Control Plane node and set the below parameter.
--tls-cipher-
suites=TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SH
A256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SH
A256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SH
A384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POL
Y1305_SHA256,TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_C
BC_SHA,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_S
HA,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,TLS_RSA_WITH_3DES_EDE_CBC_SHA,TL
S_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_2
56_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384.
Default Value:
By default the Kubernetes API server supports a wide range of TLS ciphers
Page 120
References:
1. https://github.com/ssllabs/research/wiki/SSL-and-TLS-Deployment-Best-
Practices#23-use-secure-cipher-suites
Additional Information:
The list chosen above should be fine for modern clients. It's essentially the list from the
Mozilla "Modern cipher" option with the ciphersuites supporting CBC mode removed, as
CBC has traditionally had a lot of issues
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 121
1.3 Controller Manager
Page 122
1.3.1 Ensure that the --terminated-pod-gc-threshold argument is
set as appropriate (Manual)
Profile Applicability:
Remediation:
Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-
controller-manager.yaml on the Control Plane node and set the --terminated-pod-gc-
threshold to an appropriate threshold, for example:
--terminated-pod-gc-threshold=10
Default Value:
By default, --terminated-pod-gc-threshold is set to 12500.
References:
1. https://kubernetes.io/docs/admin/kube-controller-manager/
2. https://github.com/kubernetes/kubernetes/issues/28484
Page 123
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 124
1.3.2 Ensure that the --profiling argument is set to false
(Automated)
Profile Applicability:
Remediation:
Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-
controller-manager.yaml on the Control Plane node and set the below parameter.
--profiling=false
Default Value:
By default, profiling is enabled.
References:
1. https://kubernetes.io/docs/admin/kube-controller-manager/
2. https://github.com/kubernetes/community/blob/master/contributors/devel/profiling.
md
Page 125
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 126
1.3.3 Ensure that the --use-service-account-credentials argument
is set to true (Automated)
Profile Applicability:
The controller manager creates a service account per controller in the kube-system
namespace, generates a credential for it, and builds a dedicated API client with that
service account credential for each controller loop to use. Setting the --use-service-
account-credentials to true runs each control loop within the controller manager using
a separate service account credential. When used in combination with RBAC, this
ensures that the control loops run with the minimum permissions required to perform
their intended tasks.
Impact:
Whatever authorizer is configured for the cluster, it must grant sufficient permissions to
the service accounts to perform their intended tasks. When using the RBAC authorizer,
those roles are created and bound to the appropriate service accounts in the kube-
system namespace automatically with default roles and rolebindings that are auto-
reconciled on startup.
If using other authorization methods (ABAC, Webhook, etc), the cluster deployer is
responsible for granting appropriate permissions to the service accounts (the required
permissions can be seen by inspecting the controller-roles.yaml and controller-
role-bindings.yaml files for the RBAC roles.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-controller-manager
Verify that the --use-service-account-credentials argument is set to true.
Remediation:
Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-
controller-manager.yaml on the Control Plane node to set the below parameter.
Page 127
--use-service-account-credentials=true
Default Value:
By default, --use-service-account-credentials is set to false.
References:
1. https://kubernetes.io/docs/admin/kube-controller-manager/
2. https://kubernetes.io/docs/admin/service-accounts-admin/
3. https://github.com/kubernetes/kubernetes/blob/release-
1.6/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml
4. https://github.com/kubernetes/kubernetes/blob/release-
1.6/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-role-
bindings.yaml
5. https://kubernetes.io/docs/admin/authorization/rbac/#controller-roles
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 128
1.3.4 Ensure that the --service-account-private-key-file argument
is set as appropriate (Automated)
Profile Applicability:
Impact:
You would need to securely maintain the key file and rotate the keys based on your
organization's key rotation policy.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-controller-manager
Verify that the --service-account-private-key-file argument is set as appropriate.
Remediation:
Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-
controller-manager.yaml on the Control Plane node and set the --service-account-
private-key-file parameter to the private key file for service accounts.
--service-account-private-key-file=<filename>
Default Value:
By default, --service-account-private-key-file it not set.
References:
1. https://kubernetes.io/docs/admin/kube-controller-manager/
Page 129
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 130
1.3.5 Ensure that the --root-ca-file argument is set as appropriate
(Automated)
Profile Applicability:
Processes running within pods that need to contact the API server must verify the API
server's serving certificate. Failing to do so could be a subject to man-in-the-middle
attacks.
Providing the root certificate for the API server's serving certificate to the controller
manager with the --root-ca-file argument allows the controller manager to inject the
trusted bundle into pods so that they can verify TLS connections to the API server.
Impact:
You need to setup and maintain root certificate authority file.
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-controller-manager
Verify that the --root-ca-file argument exists and is set to a certificate bundle file
containing the root certificate for the API server's serving certificate.
Remediation:
Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-
controller-manager.yaml on the Control Plane node and set the --root-ca-file
parameter to the certificate bundle file`.
--root-ca-file=<path/to/file>
Default Value:
By default, --root-ca-file is not set.
References:
1. https://kubernetes.io/docs/admin/kube-controller-manager/
2. https://github.com/kubernetes/kubernetes/issues/11000
Page 131
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 132
1.3.6 Ensure that the RotateKubeletServerCertificate argument is
set to true (Automated)
Profile Applicability:
Remediation:
Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-
controller-manager.yaml on the Control Plane node and set the --feature-gates
parameter to include RotateKubeletServerCertificate=true.
--feature-gates=RotateKubeletServerCertificate=true
Default Value:
By default, RotateKubeletServerCertificate is set to "true" this recommendation
verifies that it has not been disabled.
References:
1. https://kubernetes.io/docs/admin/kubelet-tls-bootstrapping/#approval-controller
Page 133
2. https://github.com/kubernetes/features/issues/267
3. https://github.com/kubernetes/kubernetes/pull/45059
4. https://kubernetes.io/docs/admin/kube-controller-manager/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 134
1.3.7 Ensure that the --bind-address argument is set to 127.0.0.1
(Automated)
Profile Applicability:
The Controller Manager API service which runs on port 10252/TCP by default is used
for health and metrics information and is available without authentication or encryption.
As such it should only be bound to a localhost interface, to minimize the cluster's attack
surface
Impact:
None
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-controller-manager
Verify that the --bind-address argument is set to 127.0.0.1
Remediation:
Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-
controller-manager.yaml on the Control Plane node and ensure the correct value for
the --bind-address parameter
Default Value:
By default, the --bind-address parameter is set to 0.0.0.0
References:
1. https://kubernetes.io/docs/reference/command-line-tools-reference/kube-
controller-manager/
Additional Information:
Although the current Kubernetes documentation site says that --address is deprecated
in favour of --bind-address Kubeadm 1.11 still makes use of --address
Page 135
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 136
1.4 Scheduler
Page 137
1.4.1 Ensure that the --profiling argument is set to false
(Automated)
Profile Applicability:
Remediation:
Edit the Scheduler pod specification file /etc/kubernetes/manifests/kube-
scheduler.yaml file on the Control Plane node and set the below parameter.
--profiling=false
Default Value:
By default, profiling is enabled.
References:
1. https://kubernetes.io/docs/admin/kube-scheduler/
2. https://github.com/kubernetes/community/blob/master/contributors/devel/profiling.
md
Page 138
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 139
1.4.2 Ensure that the --bind-address argument is set to 127.0.0.1
(Automated)
Profile Applicability:
The Scheduler API service which runs on port 10251/TCP by default is used for health
and metrics information and is available without authentication or encryption. As such it
should only be bound to a localhost interface, to minimize the cluster's attack surface
Impact:
None
Audit:
Run the following command on the Control Plane node:
ps -ef | grep kube-scheduler
Verify that the --bind-address argument is set to 127.0.0.1
Remediation:
Edit the Scheduler pod specification file /etc/kubernetes/manifests/kube-
scheduler.yaml on the Control Plane node and ensure the correct value for the --bind-
address parameter
Default Value:
By default, the --bind-address parameter is set to 0.0.0.0
References:
1. https://kubernetes.io/docs/reference/command-line-tools-reference/kube-
scheduler/
Page 140
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 141
2 etcd
This section covers recommendations for etcd configuration.
This sections assumes you're running etcd in a Kubernetes pod. If you are running etcd
externally the file paths, audit and remediation process my vary.
Page 142
2.1 Ensure that the --cert-file and --key-file arguments are set as
appropriate (Automated)
Profile Applicability:
Default Value:
By default, TLS encryption is not set.
References:
1. https://coreos.com/etcd/docs/latest/op-guide/security.html
2. https://kubernetes.io/docs/admin/etcd/
Page 143
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 144
2.2 Ensure that the --client-cert-auth argument is set to true
(Automated)
Profile Applicability:
Remediation:
Edit the etcd pod specification file /etc/kubernetes/manifests/etcd.yaml on the
master node and set the below parameter.
--client-cert-auth="true"
Default Value:
By default, the etcd service can be queried by unauthenticated clients.
References:
1. https://coreos.com/etcd/docs/latest/op-guide/security.html
2. https://kubernetes.io/docs/admin/etcd/
3. https://coreos.com/etcd/docs/latest/op-guide/configuration.html#client-cert-auth
Page 145
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 146
2.3 Ensure that the --auto-tls argument is not set to true
(Automated)
Profile Applicability:
Remediation:
Edit the etcd pod specification file /etc/kubernetes/manifests/etcd.yaml on the
master node and either remove the --auto-tls parameter or set it to false.
--auto-tls=false
Default Value:
By default, --auto-tls is set to false.
References:
1. https://coreos.com/etcd/docs/latest/op-guide/security.html
2. https://kubernetes.io/docs/admin/etcd/
3. https://coreos.com/etcd/docs/latest/op-guide/configuration.html#auto-tls
Page 147
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 148
2.4 Ensure that the --peer-cert-file and --peer-key-file arguments
are set as appropriate (Automated)
Profile Applicability:
Default Value:
Note: This recommendation is applicable only for etcd clusters. If you are using only
one etcd server in your environment then this recommendation is not applicable.
By default, peer communication over TLS is not configured.
Page 149
References:
1. https://coreos.com/etcd/docs/latest/op-guide/security.html
2. https://kubernetes.io/docs/admin/etcd/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 150
2.5 Ensure that the --peer-client-cert-auth argument is set to true
(Automated)
Profile Applicability:
Default Value:
Note: This recommendation is applicable only for etcd clusters. If you are using only
one etcd server in your environment then this recommendation is not applicable.
By default, --peer-client-cert-auth argument is set to false.
References:
1. https://coreos.com/etcd/docs/latest/op-guide/security.html
2. https://kubernetes.io/docs/admin/etcd/
Page 151
3. https://coreos.com/etcd/docs/latest/op-guide/configuration.html#peer-client-cert-
auth
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 152
2.6 Ensure that the --peer-auto-tls argument is not set to true
(Automated)
Profile Applicability:
Default Value:
Note: This recommendation is applicable only for etcd clusters. If you are using only
one etcd server in your environment then this recommendation is not applicable.
By default, --peer-auto-tls argument is set to false.
References:
1. https://coreos.com/etcd/docs/latest/op-guide/security.html
Page 153
2. https://kubernetes.io/docs/admin/etcd/
3. https://coreos.com/etcd/docs/latest/op-guide/configuration.html#peer-auto-tls
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 154
2.7 Ensure that a unique Certificate Authority is used for etcd
(Manual)
Profile Applicability:
Remediation:
Follow the etcd documentation and create a dedicated certificate authority setup for the
etcd service.
Then, edit the etcd pod specification file /etc/kubernetes/manifests/etcd.yaml on the
master node and set the below parameter.
Page 155
--trusted-ca-file=</path/to/ca-file>
Default Value:
By default, no etcd certificate is created and used.
References:
1. https://coreos.com/etcd/docs/latest/op-guide/security.html
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 156
3.1 Authentication and Authorization
Page 157
3.1.1 Client certificate authentication should not be used for users
(Manual)
Profile Applicability:
Page 158
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 159
3.1.2 Service account token authentication should not be used for
users (Manual)
Profile Applicability:
Page 160
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 161
3.1.3 Bootstrap token authentication should not be used for users
(Manual)
Profile Applicability:
Page 162
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 163
3.2 Logging
Page 164
3.2.1 Ensure that a minimal audit policy is created (Manual)
Profile Applicability:
Rationale:
Logging is an important detective control for all systems, to detect potential
unauthorised access.
Impact:
Audit logs will be created on the master nodes, which will consume disk space. Care
should be taken to avoid generating too large volumes of log information as this could
impact the available of the cluster nodes.
Audit:
Run the following command on one of the cluster master nodes:
ps -ef | grep kube-apiserver
Verify that the --audit-policy-file is set. Review the contents of the file specified and
ensure that it contains a valid audit policy.
Remediation:
Create an audit policy file for your cluster.
Default Value:
Unless the --audit-policy-file flag is specified, no auditing will be carried out.
References:
1. https://kubernetes.io/docs/tasks/debug-application-cluster/audit/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 165
Controls
Control IG 1 IG 2 IG 3
Version
Page 166
3.2.2 Ensure that the audit policy covers key security concerns
(Manual)
Profile Applicability:
Security audit logs should cover access and modification of key resources in the cluster,
to enable them to form an effective part of a security environment.
Impact:
Increasing audit logging will consume resources on the nodes or other log destination.
Audit:
Review the audit policy provided for the cluster and ensure that it covers at least the
following areas :-
• Access to Secrets managed by the cluster. Care should be taken to only log
Metadata for requests to Secrets, ConfigMaps, and TokenReviews, in order to
avoid the risk of logging sensitive data.
• Modification of pod and deployment objects.
• Use of pods/exec, pods/portforward, pods/proxy and services/proxy.
For most requests, minimally logging at the Metadata level is recommended (the most
basic level of logging).
Remediation:
Consider modification of the audit policy in use on the cluster to include these items, at
a minimum.
Default Value:
By default Kubernetes clusters do not log audit information.
References:
1. https://github.com/k8scop/k8s-security-
dashboard/blob/master/configs/kubernetes/adv-audit.yaml
2. https://kubernetes.io/docs/tasks/debug-application-cluster/audit/#audit-policy
Page 167
3. https://github.com/falcosecurity/falco/blob/master/examples/k8s_audit_config/aud
it-policy.yaml
4. https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/gci/configure-
helper.sh#L735
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
4 Worker Nodes
This section consists of security recommendations for the components that run on
Kubernetes worker nodes.
Note that these components may also run on Kubernetes master nodes, so the
recommendations in this section should be applied to master nodes as well as worker
nodes where the master nodes make use of these components.
Page 168
4.1 Worker Node Configuration Files
This section covers recommendations for configuration files on the worker nodes.
To Perform an Automated Audit utilizing CIS-CAT the following parameters must be set
on each node being evaluated.
$kubelet_service_config
$kubelet_config
$kubelet_config_yaml
If you are auditing a kubeadm environment the default settings for these values are
below:
export kubelet_service_config=/etc/systemd/system/kubelet.service.d/10-
kubeadm.conf
export kubelet_config=/etc/kubernetes/kubelet.conf
export kubelet_config_yaml=/var/lib/kubelet/config.yaml
Page 169
4.1.1 Ensure that the kubelet service file permissions are set to
600 or more restrictive (Automated)
Profile Applicability:
Rationale:
The kubelet service file controls various parameters that set the behavior of the
kubelet service in the worker node. You should restrict its file permissions to maintain
the integrity of the file. The file should be writable by only the administrators on the
system.
Impact:
None
Audit:
Automated AAC auditing has been modified to allow CIS-CAT to input a variable for the
<PATH>/<FILENAME> of the kubelet service config file.
Please set $kubelet_service_config=<PATH> based on the file location on your system
for example:
export
kubelet_service_config=/etc/systemd/system/kubelet.service.d/kubeadm.conf
To perform the audit manually:
Run the below command (based on the file location on your system) on the each worker
node. For example,
stat -c %a /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
Verify that the permissions are 600 or more restrictive.
Remediation:
Run the below command (based on the file location on your system) on the each worker
node. For example,
chmod 600 /etc/systemd/system/kubelet.service.d/kubeadm.conf
Default Value:
By default, the kubelet service file has permissions of 640.
Page 170
References:
1. https://kubernetes.io/docs/admin/kubelet/
2. https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#44-
joining-your-nodes
3. https://kubernetes.io/docs/admin/kubeadm/#kubelet-drop-in
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 171
4.1.2 Ensure that the kubelet service file ownership is set to
root:root (Automated)
Profile Applicability:
Rationale:
The kubelet service file controls various parameters that set the behavior of the
kubelet service in the worker node. You should set its file ownership to maintain the
integrity of the file. The file should be owned by root:root.
Impact:
None
Audit:
Automated AAC auditing has been modified to allow CIS-CAT to input a variable for the
<PATH>/<FILENAME> of the kubelet service config file.
Please set $kubelet_service_config=<PATH> based on the file location on your system
for example:
export
kubelet_service_config=/etc/systemd/system/kubelet.service.d/kubeadm.conf
To perform the audit manually:
Run the below command (based on the file location on your system) on the each worker
node. For example,
stat -c %U:%G /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
Verify that the ownership is set to root:root.
Remediation:
Run the below command (based on the file location on your system) on the each worker
node. For example,
chown root:root /etc/systemd/system/kubelet.service.d/kubeadm.conf
Default Value:
By default, kubelet service file ownership is set to root:root.
Page 172
References:
1. https://kubernetes.io/docs/admin/kubelet/
2. https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#44-
joining-your-nodes
3. https://kubernetes.io/docs/admin/kubeadm/#kubelet-drop-in
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 173
4.1.3 If proxy kubeconfig file exists ensure permissions are set to
600 or more restrictive (Manual)
Profile Applicability:
Rationale:
The kube-proxy kubeconfig file controls various parameters of the kube-proxy service in
the worker node. You should restrict its file permissions to maintain the integrity of the
file. The file should be writable by only the administrators on the system.
It is possible to run kube-proxy with the kubeconfig parameters configured as a
Kubernetes ConfigMap instead of a file. In this case, there is no proxy kubeconfig file.
Impact:
None
Audit:
Find the kubeconfig file being used by kube-proxy by running the following command:
ps -ef | grep kube-proxy
If kube-proxy is running, get the kubeconfig file location from the --kubeconfig
parameter.
To perform the audit:
Run the below command (based on the file location on your system) on the each worker
node. For example,
stat -c %a <path><filename>
Verify that a file is specified and it exists with permissions are 600 or more restrictive.
Remediation:
Run the below command (based on the file location on your system) on the each worker
node. For example,
chmod 600 <proxy kubeconfig file>
Default Value:
By default, proxy file has permissions of 640.
Page 174
References:
1. https://kubernetes.io/docs/admin/kube-proxy/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 175
4.1.4 If proxy kubeconfig file exists ensure ownership is set to
root:root (Manual)
Profile Applicability:
Rationale:
The kubeconfig file for kube-proxy controls various parameters for the kube-proxy
service in the worker node. You should set its file ownership to maintain the integrity of
the file. The file should be owned by root:root.
Impact:
None
Audit:
Find the kubeconfig file being used by kube-proxy by running the following command:
ps -ef | grep kube-proxy
If kube-proxy is running, get the kubeconfig file location from the --kubeconfig
parameter.
To perform the audit:
Run the below command (based on the file location on your system) on the each worker
node. For example,
stat -c %U:%G <path><filename>
Verify that the ownership is set to root:root.
Remediation:
Run the below command (based on the file location on your system) on the each worker
node. For example,
chown root:root <proxy kubeconfig file>
Default Value:
By default, proxy file ownership is set to root:root.
References:
1. https://kubernetes.io/docs/admin/kube-proxy/
Page 176
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 177
4.1.5 Ensure that the --kubeconfig kubelet.conf file permissions
are set to 600 or more restrictive (Automated)
Profile Applicability:
Rationale:
The kubelet.conf file is the kubeconfig file for the node, and controls various
parameters that set the behavior and identity of the worker node. You should restrict its
file permissions to maintain the integrity of the file. The file should be writable by only
the administrators on the system.
Impact:
None
Audit:
Automated AAC auditing has been modified to allow CIS-CAT to input a variable for the
<PATH>/<FILENAME> of the kubelet config file.
Please set $kubelet_config=<PATH> based on the file location on your system
for example:
export kubelet_config=/etc/kubernetes/kubelet.conf
To perform the audit manually:
Run the below command (based on the file location on your system) on the each worker
node. For example,
stat -c %a /etc/kubernetes/kubelet.conf
Verify that the ownership is set to root:root.Verify that the permissions are 600 or more
restrictive.
Remediation:
Run the below command (based on the file location on your system) on the each worker
node. For example,
chmod 600 /etc/kubernetes/kubelet.conf
Default Value:
By default, kubelet.conf file has permissions of 600.
Page 178
References:
1. https://kubernetes.io/docs/admin/kubelet/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 179
4.1.6 Ensure that the --kubeconfig kubelet.conf file ownership is
set to root:root (Automated)
Profile Applicability:
Rationale:
The kubelet.conf file is the kubeconfig file for the node, and controls various
parameters that set the behavior and identity of the worker node. You should set its file
ownership to maintain the integrity of the file. The file should be owned by root:root.
Impact:
None
Audit:
Automated AAC auditing has been modified to allow CIS-CAT to input a variable for the
<PATH>/<FILENAME> of the kubelet config file.
Please set $kubelet_config=<PATH> based on the file location on your system
for example:
export kubelet_config=/etc/kubernetes/kubelet.conf
To perform the audit manually:
Run the below command (based on the file location on your system) on the each worker
node. For example,
stat -c %U %G /etc/kubernetes/kubelet.conf
Verify that the ownership is set to root:root.
Remediation:
Run the below command (based on the file location on your system) on the each worker
node. For example,
chown root:root /etc/kubernetes/kubelet.conf
Default Value:
By default, kubelet.conf file ownership is set to root:root.
References:
1. https://kubernetes.io/docs/admin/kubelet/
Page 180
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 181
4.1.7 Ensure that the certificate authorities file permissions are set
to 600 or more restrictive (Manual)
Profile Applicability:
Rationale:
The certificate authorities file controls the authorities used to validate API requests. You
should restrict its file permissions to maintain the integrity of the file. The file should be
writable by only the administrators on the system.
Impact:
None
Audit:
Run the following command:
ps -ef | grep kubelet
Find the file specified by the --client-ca-file argument.
Run the following command:
stat -c %a <filename>
Verify that the permissions are 644 or more restrictive.
Remediation:
Run the following command to modify the file permissions of the --client-ca-file
chmod 600 <filename>
Default Value:
By default no --client-ca-file is specified.
References:
1. https://kubernetes.io/docs/admin/authentication/#x509-client-certs
Page 182
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 183
4.1.8 Ensure that the client certificate authorities file ownership is
set to root:root (Manual)
Profile Applicability:
Rationale:
The certificate authorities file controls the authorities used to validate API requests. You
should set its file ownership to maintain the integrity of the file. The file should be owned
by root:root.
Impact:
None
Audit:
Run the following command:
ps -ef | grep kubelet
Find the file specified by the --client-ca-file argument.
Run the following command:
stat -c %U:%G <filename>
Verify that the ownership is set to root:root.
Remediation:
Run the following command to modify the ownership of the --client-ca-file.
chown root:root <filename>
Default Value:
By default no --client-ca-file is specified.
References:
1. https://kubernetes.io/docs/admin/authentication/#x509-client-certs
Page 184
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 185
4.1.9 If the kubelet config.yaml configuration file is being used
validate permissions set to 600 or more restrictive (Manual)
Profile Applicability:
Default Value:
By default, the /var/lib/kubelet/config.yaml file as set up by kubeadm has permissions of
600.
Page 186
References:
1. https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 187
4.1.10 If the kubelet config.yaml configuration file is being used
validate file ownership is set to root:root (Manual)
Profile Applicability:
Remediation:
Run the following command (using the config file location identied in the Audit step)
chown root:root /etc/kubernetes/kubelet.conf
Default Value:
By default, /var/lib/kubelet/config.yaml file as set up by kubeadm is owned by
root:root.
Page 188
References:
1. https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 189
4.2 Kubelet
Page 190
4.2.1 Ensure that the --anonymous-auth argument is set to false
(Automated)
Profile Applicability:
When enabled, requests that are not rejected by other configured authentication
methods are treated as anonymous requests. These requests are then served by the
Kubelet server. You should rely on authentication to authorize access and disallow
anonymous requests.
Impact:
Anonymous requests will be rejected.
Audit:
If using a Kubelet configuration file, check that there is an entry for authentication:
anonymous: enabled set to false.
Run the following command on each node:
ps -ef | grep kubelet
Verify that the --anonymous-auth argument is set to false.
This executable argument may be omitted, provided there is a corresponding entry set
to false in the Kubelet config file.
Remediation:
If using a Kubelet config file, edit the file to set authentication: anonymous: enabled to
false.
If using executable arguments, edit the kubelet service file
/etc/kubernetes/kubelet.conf on each worker node and set the below parameter in
KUBELET_SYSTEM_PODS_ARGS variable.
--anonymous-auth=false
Based on your system, restart the kubelet service. For example:
systemctl daemon-reload
systemctl restart kubelet.service
Default Value:
By default, anonymous access is enabled.
Page 191
References:
1. https://kubernetes.io/docs/admin/kubelet/
2. https://kubernetes.io/docs/admin/kubelet-authentication-authorization/#kubelet-
authentication
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 192
4.2.2 Ensure that the --authorization-mode argument is not set to
AlwaysAllow (Automated)
Profile Applicability:
Kubelets, by default, allow all authenticated requests (even anonymous ones) without
needing explicit authorization checks from the apiserver. You should restrict this
behavior and only allow explicitly authorized requests.
Impact:
Unauthorized requests will be denied.
Audit:
Run the following command on each node:
ps -ef | grep kubelet
If the --authorization-mode argument is present check that it is not set to AlwaysAllow.
If it is not present check that there is a Kubelet config file specified by --config, and
that file sets authorization: mode to something other than AlwaysAllow.
It is also possible to review the running configuration of a Kubelet via the /configz
endpoint on the Kubelet API port (typically 10250/TCP). Accessing these with appropriate
credentials will provide details of the Kubelet's configuration.
Remediation:
If using a Kubelet config file, edit the file to set authorization: mode to Webhook.
If using executable arguments, edit the kubelet service file
/etc/kubernetes/kubelet.conf on each worker node and set the below parameter in
KUBELET_AUTHZ_ARGS variable.
--authorization-mode=Webhook
Based on your system, restart the kubelet service. For example:
systemctl daemon-reload
systemctl restart kubelet.service
Default Value:
By default, --authorization-mode argument is set to AlwaysAllow.
Page 193
References:
1. https://kubernetes.io/docs/admin/kubelet/
2. https://kubernetes.io/docs/admin/kubelet-authentication-authorization/#kubelet-
authentication
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 194
4.2.3 Ensure that the --client-ca-file argument is set as
appropriate (Automated)
Profile Applicability:
The connections from the apiserver to the kubelet are used for fetching logs for pods,
attaching (through kubectl) to running pods, and using the kubelet’s port-forwarding
functionality. These connections terminate at the kubelet’s HTTPS endpoint. By default,
the apiserver does not verify the kubelet’s serving certificate, which makes the
connection subject to man-in-the-middle attacks, and unsafe to run over untrusted
and/or public networks. Enabling Kubelet certificate authentication ensures that the
apiserver could authenticate the Kubelet before submitting any requests.
Impact:
You require TLS to be configured on apiserver as well as kubelets.
Audit:
Run the following command on each node:
ps -ef | grep kubelet
Verify that the --client-ca-file argument exists and is set to the location of the client
certificate authority file.
If the --client-ca-file argument is not present, check that there is a Kubelet config file
specified by --config, and that the file sets authentication: x509: clientCAFile to
the location of the client certificate authority file.
Remediation:
If using a Kubelet config file, edit the file to set authentication: x509: clientCAFile to
the location of the client CA file.
If using command line arguments, edit the kubelet service file
/etc/kubernetes/kubelet.conf on each worker node and set the below parameter in
KUBELET_AUTHZ_ARGS variable.
--client-ca-file=<path/to/client-ca-file>
Based on your system, restart the kubelet service. For example:
Page 195
systemctl daemon-reload
systemctl restart kubelet.service
Default Value:
By default, --client-ca-file argument is not set.
References:
1. https://kubernetes.io/docs/admin/kubelet/
2. https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet-
authentication-authorization/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 196
4.2.4 Verify that the --read-only-port argument is set to 0 (Manual)
Profile Applicability:
--read-only-port=0
Based on your system, restart the kubelet service. For example:
systemctl daemon-reload
systemctl restart kubelet.service
Default Value:
By default, --read-only-port is set to 10255/TCP. However, if a config file is specified by
--config the default value for readOnlyPort is 0.
Page 197
References:
1. https://kubernetes.io/docs/admin/kubelet/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 198
4.2.5 Ensure that the --streaming-connection-idle-timeout
argument is not set to 0 (Manual)
Profile Applicability:
Setting idle timeouts ensures that you are protected against Denial-of-Service attacks,
inactive connections and running out of ephemeral ports.
Note: By default, --streaming-connection-idle-timeout is set to 4 hours which might
be too high for your environment. Setting this as appropriate would additionally ensure
that such streaming connections are timed out after serving legitimate use cases.
Impact:
Long-lived connections could be interrupted.
Audit:
Run the following command on each node:
ps -ef | grep kubelet
Verify that the --streaming-connection-idle-timeout argument is not set to 0.
If the argument is not present, and there is a Kubelet config file specified by --config,
check that it does not set streamingConnectionIdleTimeout to 0.
Remediation:
If using a Kubelet config file, edit the file to set streamingConnectionIdleTimeout to a
value other than 0.
If using command line arguments, edit the kubelet service file
/etc/kubernetes/kubelet.conf on each worker node and set the below parameter in
KUBELET_SYSTEM_PODS_ARGS variable.
--streaming-connection-idle-timeout=5m
Based on your system, restart the kubelet service. For example:
systemctl daemon-reload
systemctl restart kubelet.service
Default Value:
By default, --streaming-connection-idle-timeout is set to 4 hours.
Page 199
References:
1. https://kubernetes.io/docs/admin/kubelet/
2. https://github.com/kubernetes/kubernetes/pull/18552
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 200
4.2.6 Ensure that the --make-iptables-util-chains argument is set
to true (Automated)
Profile Applicability:
Kubelets can automatically manage the required changes to iptables based on how you
choose your networking options for the pods. It is recommended to let kubelets manage
the changes to iptables. This ensures that the iptables configuration remains in sync
with pods networking configuration. Manually configuring iptables with dynamic pod
network configuration changes might hamper the communication between
pods/containers and to the outside world. You might have iptables rules too restrictive
or too open.
Impact:
Kubelet would manage the iptables on the system and keep it in sync. If you are using
any other iptables management solution, then there might be some conflicts.
Audit:
Run the following command on each node:
ps -ef | grep kubelet
Verify that if the --make-iptables-util-chains argument exists then it is set to true.
If the --make-iptables-util-chains argument does not exist, and there is a Kubelet
config file specified by --config, verify that the file does not set
makeIPTablesUtilChains to false.
Remediation:
If using a Kubelet config file, edit the file to set makeIPTablesUtilChains: true.
If using command line arguments, edit the kubelet service file
/etc/kubernetes/kubelet.conf on each worker node and remove the --make-
iptables-util-chains argument from the KUBELET_SYSTEM_PODS_ARGS variable.
Based on your system, restart the kubelet service. For example:
systemctl daemon-reload
systemctl restart kubelet.service
Default Value:
By default, --make-iptables-util-chains argument is set to true.
Page 201
References:
1. https://kubernetes.io/docs/admin/kubelet/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 202
4.2.7 Ensure that the --hostname-override argument is not set
(Manual)
Profile Applicability:
Overriding hostnames could potentially break TLS setup between the kubelet and the
apiserver. Additionally, with overridden hostnames, it becomes increasingly difficult to
associate logs with a particular node and process them for security analytics. Hence,
you should setup your kubelet nodes with resolvable FQDNs and avoid overriding the
hostnames with IPs.
Impact:
Some cloud providers may require this flag to ensure that hostname matches names
issued by the cloud provider. In these environments, this recommendation should not
apply.
Audit:
Run the following command on each node:
ps -ef | grep kubelet
Verify that --hostname-override argument does not exist.
Note This setting is not configurable via the Kubelet config file.
Remediation:
Edit the kubelet service file /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
on each worker node and remove the --hostname-override argument from the
KUBELET_SYSTEM_PODS_ARGS variable.
Based on your system, restart the kubelet service. For example:
systemctl daemon-reload
systemctl restart kubelet.service
Default Value:
By default, --hostname-override argument is not set.
References:
1. https://kubernetes.io/docs/admin/kubelet/
Page 203
2. https://github.com/kubernetes/kubernetes/issues/22063
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 204
4.2.8 Ensure that the eventRecordQPS argument is set to a level
which ensures appropriate event capture (Manual)
Profile Applicability:
Remediation:
If using a Kubelet config file, edit the file to set eventRecordQPS: to an appropriate level.
If using command line arguments, edit the kubelet service file
/etc/systemd/system/kubelet.service.d/10-kubeadm.conf on each worker node and
set the below parameter in KUBELET_SYSTEM_PODS_ARGS variable.
Based on your system, restart the kubelet service. For example:
Page 205
systemctl daemon-reload
systemctl restart kubelet.service
Default Value:
By default, eventRecordQPS argument is set to 5.
References:
1. https://kubernetes.io/docs/admin/kubelet/
2. https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/kubeletco
nfig/v1beta1/types.go
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 206
4.2.9 Ensure that the --tls-cert-file and --tls-private-key-file
arguments are set as appropriate (Manual)
Profile Applicability:
The connections from the apiserver to the kubelet are used for fetching logs for pods,
attaching (through kubectl) to running pods, and using the kubelet’s port-forwarding
functionality. These connections terminate at the kubelet’s HTTPS endpoint. By default,
the apiserver does not verify the kubelet’s serving certificate, which makes the
connection subject to man-in-the-middle attacks, and unsafe to run over untrusted
and/or public networks.
Audit:
Run the following command on each node:
ps -ef | grep kubelet
Verify that the --tls-cert-file and --tls-private-key-file arguments exist and they are set as
appropriate.
If these arguments are not present, check that there is a Kubelet config specified by --
config and that it contains appropriate settings for tlsCertFile and tlsPrivateKeyFile.
Remediation:
If using a Kubelet config file, edit the file to set tlsCertFile to the location of the certificate
file to use to identify this Kubelet, and tlsPrivateKeyFile to the location of the
corresponding private key file.
If using command line arguments, edit the kubelet service file
/etc/kubernetes/kubelet.conf on each worker node and set the below parameters in
KUBELET_CERTIFICATE_ARGS variable.
--tls-cert-file=<path/to/tls-certificate-file> --tls-private-key-file=<path/to/tls-key-file>
Based on your system, restart the kubelet service. For example:
Page 207
systemctl daemon-reload
systemctl restart kubelet.service
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 208
4.2.10 Ensure that the --rotate-certificates argument is not set to
false (Automated)
Profile Applicability:
The --rotate-certificates setting causes the kubelet to rotate its client certificates by
creating new CSRs as its existing credentials expire. This automated periodic rotation
ensures that the there is no downtime due to expired certificates and thus addressing
availability in the CIA security triad.
Note: This recommendation only applies if you let kubelets get their certificates from the
API server. In case your kubelet certificates come from an outside authority/tool (e.g.
Vault) then you need to take care of rotation yourself.
Note: This feature also require the RotateKubeletClientCertificate feature gate to be
enabled (which is the default since Kubernetes v1.7)
Impact:
None
Audit:
Page 209
systemctl daemon-reload
systemctl restart kubelet.service
Default Value:
By default, kubelet client certificate rotation is enabled.
References:
1. https://github.com/kubernetes/kubernetes/pull/41912
2. https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet-tls-
bootstrapping/#kubelet-configuration
3. https://kubernetes.io/docs/imported/release/notes/
4. https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 210
4.2.11 Verify that the RotateKubeletServerCertificate argument is
set to true (Manual)
Profile Applicability:
Remediation:
Edit the kubelet service file /etc/kubernetes/kubelet.conf on each worker node and
set the below parameter in KUBELET_CERTIFICATE_ARGS variable.
--feature-gates=RotateKubeletServerCertificate=true
Based on your system, restart the kubelet service. For example:
systemctl daemon-reload
systemctl restart kubelet.service
Default Value:
By default, kubelet server certificate rotation is enabled.
Page 211
References:
1. https://github.com/kubernetes/kubernetes/pull/45059
2. https://kubernetes.io/docs/admin/kubelet-tls-bootstrapping/#kubelet-configuration
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 212
4.2.12 Ensure that the Kubelet only makes use of Strong
Cryptographic Ciphers (Manual)
Profile Applicability:
TLS ciphers have had a number of known vulnerabilities and weaknesses, which can
reduce the protection provided by them. By default Kubernetes supports a number of
TLS ciphersuites including some that have security concerns, weakening the protection
provided.
Impact:
Kubelet clients that cannot support modern cryptographic ciphers will not be able to
make connections to the Kubelet API.
Audit:
The set of cryptographic ciphers currently considered secure is the following:
•
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
•
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
•
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
•
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
•
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
•
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
•
TLS_RSA_WITH_AES_256_GCM_SHA384
•
TLS_RSA_WITH_AES_128_GCM_SHA256
Page 213
ps -ef | grep kubelet
If the --tls-cipher-suites argument is present, ensure it only contains values included
in this set.
If it is not present check that there is a Kubelet config file specified by --config, and
that file sets TLSCipherSuites: to only include values from this set.
Remediation:
If using a Kubelet config file, edit the file to set TLSCipherSuites: to
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 or to a subset
of these values.
If using executable arguments, edit the kubelet service file
/etc/kubernetes/kubelet.conf on each worker node and set the --tls-cipher-suites
parameter as follows, or to a subset of these values.
--tls-cipher-
suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM
_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM
_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM
_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256
Based on your system, restart the kubelet service. For example:
systemctl daemon-reload
systemctl restart kubelet.service
Default Value:
By default the Kubernetes API server supports a wide range of TLS ciphers
Additional Information:
The list chosen above should be fine for modern clients. It's essentially the list from the
Mozilla "Modern cipher" option with the ciphersuites supporting CBC mode removed, as
CBC has traditionally had a lot of issues
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 214
Controls
Control IG 1 IG 2 IG 3
Version
Page 215
4.2.13 Ensure that a limit is set on pod PIDs (Manual)
Profile Applicability:
Default Value:
By default the number of PIDs is not limited.
References:
1. https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits
5 Policies
This section contains recommendations for various Kubernetes policies which are
important to the security of the environment.
Page 216
5.1 RBAC and Service Accounts
Page 217
5.1.1 Ensure that the cluster-admin role is only used where
required (Manual)
Profile Applicability:
Page 218
kubectl delete clusterrolebinding [name]
Default Value:
By default a single clusterrolebinding called cluster-admin is provided with the
system:masters group as its principal.
References:
1. https://kubernetes.io/docs/admin/authorization/rbac/#user-facing-roles
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 219
5.1.2 Minimize access to secrets (Manual)
Profile Applicability:
Page 220
CLUSTERROLEBINDING SUBJECT
TYPE SA-NAMESPACE
cluster-admin system:masters
Group
system:controller:clusterrole-aggregation-controller clusterrole-
aggregation-controller ServiceAccount kube-system
system:controller:expand-controller expand-controller
ServiceAccount kube-system
system:controller:generic-garbage-collector generic-garbage-
collector ServiceAccount kube-system
system:controller:namespace-controller namespace-controller
ServiceAccount kube-system
system:controller:persistent-volume-binder persistent-volume-
binder ServiceAccount kube-system
system:kube-controller-manager system:kube-controller-
manager User
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
3 Data Protection
v8 Develop processes and technical controls to identify, classify, securely
handle, retain, and dispose of data.
Page 221
5.1.3 Minimize wildcard use in Roles and ClusterRoles (Manual)
Profile Applicability:
Remediation:
Where possible replace any use of wildcards in clusterroles and roles with specific
objects or actions.
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 222
Page 223
5.1.4 Minimize access to create pods (Manual)
Profile Applicability:
Default Value:
By default in a kubeadm cluster the following list of principals have create privileges on
pod objects
Page 224
CLUSTERROLEBINDING SUBJECT
TYPE SA-NAMESPACE
cluster-admin system:masters
Group
system:controller:clusterrole-aggregation-controller clusterrole-
aggregation-controller ServiceAccount kube-system
system:controller:daemon-set-controller daemon-set-controller
ServiceAccount kube-system
system:controller:job-controller job-controller
ServiceAccount kube-system
system:controller:persistent-volume-binder persistent-volume-
binder ServiceAccount kube-system
system:controller:replicaset-controller replicaset-controller
ServiceAccount kube-system
system:controller:replication-controller replication-controller
ServiceAccount kube-system
system:controller:statefulset-controller statefulset-controller
ServiceAccount kube-system
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 225
5.1.5 Ensure that default service accounts are not actively used.
(Manual)
Profile Applicability:
Default Value:
By default the default service account allows for its service account token to be
mounted in pods in its namespace.
Page 226
References:
1. https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-
account/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 227
5.1.6 Ensure that Service Account Tokens are only mounted
where necessary (Manual)
Profile Applicability:
Remediation:
Modify the definition of pods and service accounts which do not need to mount service
account tokens to disable it.
Default Value:
By default, all pods get a service account token mounted in them.
References:
1. https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-
account/
Page 228
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
3 Data Protection
v8 Develop processes and technical controls to identify, classify, securely
handle, retain, and dispose of data.
v7 13 Data Protection
Data Protection
Page 229
5.1.7 Avoid use of system:masters group (Manual)
Profile Applicability:
Remediation:
Remove the system:masters group from all users in the cluster.
Default Value:
By default some clusters will create a "break glass" client certificate which is a member
of this group. Access to this client certificate should be carefully controlled and it should
not be used for general cluster operations.
References:
1. https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/rbac/escalatio
n_check.go#L38
Page 230
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 231
5.1.8 Limit use of the Bind, Impersonate and Escalate
permissions in the Kubernetes cluster (Manual)
Profile Applicability:
1. https://www.impidio.com/blog/kubernetes-rbac-security-pitfalls
2. https://raesene.github.io/blog/2020/12/12/Escalating_Away/
3. https://raesene.github.io/blog/2021/01/16/Getting-Into-A-Bind-with-Kubernetes/
Page 232
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 233
5.1.9 Minimize access to create persistent volumes (Manual)
Profile Applicability:
References:
1. https://kubernetes.io/docs/concepts/security/rbac-good-practices/#persistent-
volume-creation
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 234
5.1.10 Minimize access to the proxy sub-resource of nodes
(Manual)
Profile Applicability:
References:
1. https://kubernetes.io/docs/concepts/security/rbac-good-practices/#access-to-
proxy-subresource-of-nodes
2. https://kubernetes.io/docs/reference/access-authn-authz/kubelet-authn-
authz/#kubelet-authorization
Page 235
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 236
5.1.11 Minimize access to the approval sub-resource of
certificatesigningrequests objects (Manual)
Profile Applicability:
Remediation:
Where possible, remove access to the approval sub-resource of
certificatesigningrequest objects.
References:
1. https://kubernetes.io/docs/concepts/security/rbac-good-practices/#csrs-and-
certificate-issuing
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 237
Page 238
5.1.12 Minimize access to webhook configuration objects
(Manual)
Profile Applicability:
Remediation:
Where possible, remove access to the validatingwebhookconfigurations or
mutatingwebhookconfigurations objects
References:
1. https://kubernetes.io/docs/concepts/security/rbac-good-practices/#control-
admission-webhooks
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 239
5.1.13 Minimize access to the service account token creation
(Manual)
Profile Applicability:
1. https://kubernetes.io/docs/concepts/security/rbac-good-practices/#token-request
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 240
5.2 Pod Security Standards
Pod Security Standards (PSS) are recommendations for securing deployed workloads
to reduce the risks of container breakout. There are a number of ways if implementing
PSS, including the built-in Pod Security Admission controller, or external policy control
systems which integrate with Kubernetes via validating and mutating webhooks.
Page 241
5.2.1 Ensure that the cluster has at least one active policy control
mechanism in place (Manual)
Profile Applicability:
Remediation:
Ensure that either Pod Security Admission or an external policy control system is in
place for every namespace which contains user workloads.
Default Value:
By default, Pod Security Admission is enabled but no policies are in place.
References:
1. https://kubernetes.io/docs/concepts/security/pod-security-admission
Page 242
5.2.2 Minimize the admission of privileged containers (Manual)
Profile Applicability:
Rationale:
Privileged containers have access to all Linux Kernel capabilities and devices. A
container running with full privileges can do almost everything that the host can do. This
flag exists to allow special use-cases, like manipulating the network stack and
accessing devices.
There should be at least one admission control policy defined which does not permit
privileged containers.
If you need to run privileged containers, this should be defined in a separate policy and
you should carefully check to ensure that only limited service accounts and users are
given permission to use that policy.
Impact:
Pods defined with spec.containers[].securityContext.privileged: true,
spec.initContainers[].securityContext.privileged: true and
spec.ephemeralContainers[].securityContext.privileged: true will not be permitted.
Audit:
List the policies in use for each namespace in the cluster, ensure that each policy
disallows the admission of privileged containers.
Remediation:
Add policies to each namespace in the cluster which has user workloads to restrict the
admission of privileged containers.
Default Value:
By default, there are no restrictions on the creation of privileged containers.
References:
1. https://kubernetes.io/docs/concepts/security/pod-security-standards/
Page 243
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 244
5.2.3 Minimize the admission of containers wishing to share the
host process ID namespace (Automated)
Profile Applicability:
Rationale:
A container running in the host's PID namespace can inspect processes running outside
the container. If the container also has access to ptrace capabilities this can be used to
escalate privileges outside of the container.
There should be at least one admission control policy defined which does not permit
containers to share the host PID namespace.
If you need to run containers which require hostPID, this should be defined in a
separate policy and you should carefully check to ensure that only limited service
accounts and users are given permission to use that policy.
Impact:
Pods defined with spec.hostPID: true will not be permitted unless they are run under a
specific policy.
Audit:
List the policies in use for each namespace in the cluster, ensure that each policy
disallows the admission of hostPID containers
Remediation:
Add policies to each namespace in the cluster which has user workloads to restrict the
admission of hostPID containers.
Default Value:
By default, there are no restrictions on the creation of hostPID containers.
References:
1. https://kubernetes.io/docs/concepts/security/pod-security-standards/
Page 245
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 246
5.2.4 Minimize the admission of containers wishing to share the
host IPC namespace (Automated)
Profile Applicability:
Rationale:
A container running in the host's IPC namespace can use IPC to interact with processes
outside the container.
There should be at least one admission control policy defined which does not permit
containers to share the host IPC namespace.
If you need to run containers which require hostIPC, this should be definited in a
separate policy and you should carefully check to ensure that only limited service
accounts and users are given permission to use that policy.
Impact:
Pods defined with spec.hostIPC: true will not be permitted unless they are run under a
specific policy.
Audit:
List the policies in use for each namespace in the cluster, ensure that each policy
disallows the admission of hostIPC containers
Remediation:
Add policies to each namespace in the cluster which has user workloads to restrict the
admission of hostIPC containers.
Default Value:
By default, there are no restrictions on the creation of hostIPC containers.
References:
1. https://kubernetes.io/docs/concepts/security/pod-security-standards/
Page 247
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 248
5.2.5 Minimize the admission of containers wishing to share the
host network namespace (Automated)
Profile Applicability:
Rationale:
A container running in the host's network namespace could access the local loopback
device, and could access network traffic to and from other pods.
There should be at least one admission control policy defined which does not permit
containers to share the host network namespace.
If you need to run containers which require access to the host's network namesapces,
this should be defined in a separate policy and you should carefully check to ensure that
only limited service accounts and users are given permission to use that policy.
Impact:
Pods defined with spec.hostNetwork: true will not be permitted unless they are run
under a specific policy.
Audit:
List the policies in use for each namespace in the cluster, ensure that each policy
disallows the admission of hostNetwork containers
Remediation:
Add policies to each namespace in the cluster which has user workloads to restrict the
admission of hostNetwork containers.
Default Value:
By default, there are no restrictions on the creation of hostNetwork containers.
References:
1. https://kubernetes.io/docs/concepts/security/pod-security-standards/
Page 249
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 250
5.2.6 Minimize the admission of containers with
allowPrivilegeEscalation (Automated)
Profile Applicability:
Page 251
References:
1. https://kubernetes.io/docs/concepts/security/pod-security-standards/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 252
5.2.7 Minimize the admission of root containers (Automated)
Profile Applicability:
Default Value:
By default, there are no restrictions on the use of root containers and if a User is not
specified in the image, the container will run as root.
References:
1. https://kubernetes.io/docs/concepts/security/pod-security-standards/
Page 253
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 254
5.2.8 Minimize the admission of containers with the NET_RAW
capability (Automated)
Profile Applicability:
Containers run with a default set of capabilities as assigned by the Container Runtime.
By default this can include potentially dangerous capabilities. With Docker as the
container runtime the NET_RAW capability is enabled which may be misused by
malicious containers.
Ideally, all containers should drop this capability.
There should be at least one admission control policy defined which does not permit
containers with the NET_RAW capability.
If you need to run containers with this capability, this should be defined in a separate
policy and you should carefully check to ensure that only limited service accounts and
users are given permission to use that policy.
Impact:
Pods with containers which run with the NET_RAW capability will not be permitted.
Audit:
List the policies in use for each namespace in the cluster, ensure that at least one policy
disallows the admission of containers with the NET_RAW capability.
Remediation:
Add policies to each namespace in the cluster which has user workloads to restrict the
admission of containers with the NET_RAW capability.
Default Value:
By default, there are no restrictions on the creation of containers with the NET_RAW
capability.
References:
1. https://kubernetes.io/docs/concepts/security/pod-security-standards/
2. https://www.nccgroup.trust/uk/our-research/abusing-privileged-and-unprivileged-
linux-containers/
Page 255
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 256
5.2.9 Minimize the admission of containers with added capabilities
(Automated)
Profile Applicability:
Containers run with a default set of capabilities as assigned by the Container Runtime.
Capabilities outside this set can be added to containers which could expose them to
risks of container breakout attacks.
There should be at least one policy defined which prevents containers with capabilities
beyond the default set from launching.
If you need to run containers with additional capabilities, this should be defined in a
separate policy and you should carefully check to ensure that only limited service
accounts and users are given permission to use that policy.
Impact:
Pods with containers which require capabilities outwith the default set will not be
permitted.
Audit:
List the policies in use for each namespace in the cluster, ensure that policies are
present which prevent allowedCapabilities to be set to anything other than an empty
array.
Remediation:
Ensure that allowedCapabilities is not present in policies for the cluster unless it is set
to an empty array.
Default Value:
By default, there are no restrictions on adding capabilities to containers.
References:
1. https://kubernetes.io/docs/concepts/security/pod-security-standards/
2. https://www.nccgroup.trust/uk/our-research/abusing-privileged-and-unprivileged-
linux-containers/
Page 257
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 258
5.2.10 Minimize the admission of containers with capabilities
assigned (Manual)
Profile Applicability:
Containers run with a default set of capabilities as assigned by the Container Runtime.
Capabilities are parts of the rights generally granted on a Linux system to the root user.
In many cases applications running in containers do not require any capabilities to
operate, so from the perspective of the principal of least privilege use of capabilities
should be minimized.
Impact:
Pods with containers require capabilities to operate will not be permitted.
Audit:
List the policies in use for each namespace in the cluster, ensure that at least one policy
requires that capabilities are dropped by all containers.
Remediation:
Review the use of capabilities in applications running on your cluster. Where a
namespace contains applications which do not require any Linux capabilities to operate
consider adding a policy which forbids the admission of containers which do not drop all
capabilities.
Default Value:
By default, there are no restrictions on the creation of containers with additional
capabilities
References:
1. https://kubernetes.io/docs/concepts/security/pod-security-standards/
2. https://www.nccgroup.trust/uk/our-research/abusing-privileged-and-unprivileged-
linux-containers/
Page 259
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 260
5.2.11 Minimize the admission of Windows HostProcess
Containers (Manual)
Profile Applicability:
Remediation:
Add policies to each namespace in the cluster which has user workloads to restrict the
admission of hostProcess containers.
Default Value:
By default, there are no restrictions on the creation of hostProcess containers.
References:
1. https://kubernetes.io/docs/tasks/configure-pod-container/create-hostprocess-pod/
2. https://kubernetes.io/docs/concepts/security/pod-security-standards/
Page 261
5.2.12 Minimize the admission of HostPath volumes (Manual)
Profile Applicability:
Rationale:
A container which mounts a hostPath volume as part of its specification will have
access to the filesystem of the underlying cluster node. The use of hostPath volumes
may allow containers access to privileged areas of the node filesystem.
There should be at least one admission control policy defined which does not permit
containers to mount hostPath volumes.
If you need to run containers which require hostPath volumes, this should be defined in
a separate policy and you should carefully check to ensure that only limited service
accounts and users are given permission to use that policy.
Impact:
Pods defined which make use of hostPath volumes will not be permitted unless they are
run under a spefific policy.
Audit:
List the policies in use for each namespace in the cluster, ensure that each policy
disallows the admission of containers with hostPath volumes.
Remediation:
Add policies to each namespace in the cluster which has user workloads to restrict the
admission of containers which use hostPath volumes.
Default Value:
By default, there are no restrictions on the creation of hostPath volumes.
References:
1. https://kubernetes.io/docs/concepts/security/pod-security-standards/
Page 262
5.2.13 Minimize the admission of containers which use HostPorts
(Manual)
Profile Applicability:
Host ports connect containers directly to the host's network. This can bypass controls
such as network policy.
There should be at least one admission control policy defined which does not permit
containers which require the use of HostPorts.
If you need to run containers which require HostPorts, this should be defined in a
separate policy and you should carefully check to ensure that only limited service
accounts and users are given permission to use that policy.
Impact:
Pods defined with hostPort settings in either the container, initContainer or
ephemeralContainer sections will not be permitted unless they are run under a specific
policy.
Audit:
List the policies in use for each namespace in the cluster, ensure that each policy
disallows the admission of containers which have hostPort sections.
Remediation:
Add policies to each namespace in the cluster which has user workloads to restrict the
admission of containers which use hostPort sections.
Default Value:
By default, there are no restrictions on the use of HostPorts.
References:
1. https://kubernetes.io/docs/concepts/security/pod-security-standards/
Page 263
5.3 Network Policies and CNI
Page 264
5.3.1 Ensure that the CNI in use supports Network Policies
(Manual)
Profile Applicability:
1. https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-
net/network-plugins/
Additional Information:
One example here is Flannel (https://github.com/coreos/flannel) which does not support
Network policy unless Calico is also in use.
Page 265
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 266
5.3.2 Ensure that all Namespaces have Network Policies defined
(Manual)
Profile Applicability:
Running different applications on the same Kubernetes cluster creates a risk of one
compromised application attacking a neighboring application. Network segmentation is
important to ensure that containers can communicate only with those they are supposed
to. A network policy is a specification of how selections of pods are allowed to
communicate with each other and other network endpoints.
Network Policies are namespace scoped. When a network policy is introduced to a
given namespace, all traffic not allowed by the policy is denied. However, if there are no
network policies in a namespace all traffic will be allowed into and out of the pods in that
namespace.
Impact:
Once network policies are in use within a given namespace, traffic not explicitly allowed
by a network policy will be denied. As such it is important to ensure that, when
introducing network policies, legitimate traffic is not blocked.
Audit:
Run the below command and review the NetworkPolicy objects created in the cluster.
kubectl get networkpolicy --all-namespaces```
Ensure that each namespace defined in the cluster has at least one Network
Policy.
Remediation:
Follow the documentation and create NetworkPolicy objects as you need them.
Default Value:
By default, network policies are not created.
References:
1. https://kubernetes.io/docs/concepts/services-networking/networkpolicies/
2. https://octetz.com/posts/k8s-network-policy-apis
Page 267
3. https://kubernetes.io/docs/tasks/configure-pod-container/declare-network-policy/
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 268
5.4 Secrets Management
Page 269
5.4.1 Prefer using secrets as files over secrets as environment
variables (Manual)
Profile Applicability:
Remediation:
If possible, rewrite application code to read secrets from mounted secret files, rather
than from environment variables.
Default Value:
By default, secrets are not defined
References:
1. https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets
Additional Information:
Mounting secrets as volumes has the additional benefit that secret values can be
updated without restarting the pod
Page 270
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
3 Data Protection
v8 Develop processes and technical controls to identify, classify, securely
handle, retain, and dispose of data.
v7 13 Data Protection
Data Protection
Page 271
5.4.2 Consider external secret storage (Manual)
Profile Applicability:
Controls
Control IG 1 IG 2 IG 3
Version
3 Data Protection
v8 Develop processes and technical controls to identify, classify, securely
handle, retain, and dispose of data.
v7 13 Data Protection
Data Protection
Page 272
5.5 Extensible Admission Control
Page 273
5.5.1 Configure Image Provenance using ImagePolicyWebhook
admission controller (Manual)
Profile Applicability:
Kubernetes supports plugging in provenance rules to accept or reject the images in your
deployments. You could configure such rules to ensure that only approved images are
deployed in the cluster.
Impact:
You need to regularly maintain your provenance configuration based on container
image updates.
Audit:
Review the pod definitions in your cluster and verify that image provenance is
configured as appropriate.
Remediation:
Follow the Kubernetes documentation and setup image provenance.
Default Value:
By default, image provenance is not set.
References:
1. https://kubernetes.io/docs/admin/admission-controllers/#imagepolicywebhook
2. https://github.com/kubernetes/community/blob/master/contributors/design-
proposals/image-provenance.md
3. https://hub.docker.com/r/dnurmi/anchore-toolbox/
4. https://github.com/kubernetes/kubernetes/issues/22888
Page 274
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 275
5.7 General Policies
These policies relate to general cluster management topics, like namespace best
practices and policies applied to pod objects in the cluster.
Page 276
5.7.1 Create administrative boundaries between resources using
namespaces (Manual)
Profile Applicability:
Limiting the scope of user permissions can reduce the impact of mistakes or malicious
activities. A Kubernetes namespace allows you to partition created resources into
logically named groups. Resources created in one namespace can be hidden from
other namespaces. By default, each resource created by a user in Kubernetes cluster
runs in a default namespace, called default. You can create additional namespaces
and attach resources and users to them. You can use Kubernetes Authorization plugins
to create policies that segregate access to namespace resources between different
users.
Impact:
You need to switch between namespaces for administration.
Audit:
Run the below command and review the namespaces created in the cluster.
kubectl get namespaces
Ensure that these namespaces are the ones you need and are adequately administered
as per your requirements.
Remediation:
Follow the documentation and create namespaces for objects in your deployment as
you need them.
Default Value:
By default, Kubernetes starts with 4 initial namespaces:
Page 277
References:
1. https://kubernetes.io/docs/concepts/overview/working-with-
objects/namespaces/#viewing-namespaces
2. http://blog.kubernetes.io/2016/08/security-best-practices-kubernetes-
deployment.html
3. https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/589-
efficient-node-heartbeats
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
v7 12 Boundary Defense
Boundary Defense
Page 278
5.7.2 Ensure that the seccomp profile is set to docker/default in
your pod definitions (Manual)
Profile Applicability:
Rationale:
Seccomp (secure computing mode) is used to restrict the set of system calls
applications can make, allowing cluster administrators greater control over the security
of workloads running in the cluster. Kubernetes disables seccomp profiles by default for
historical reasons. You should enable it to ensure that the workloads have restricted
actions available within the container.
Impact:
If the docker/default seccomp profile is too restrictive for you, you would have to
create/manage your own seccomp profiles.
Audit:
Review the pod definitions in your cluster. It should create a line as below:
securityContext:
seccompProfile:
type: RuntimeDefault
Remediation:
Use security context to enable the docker/default seccomp profile in your pod
definitions. An example is as below:
securityContext:
seccompProfile:
type: RuntimeDefault
Default Value:
By default, seccomp profile is set to unconfined which means that no seccomp profiles
are enabled.
References:
1. https://kubernetes.io/docs/tutorials/clusters/seccomp/
2. https://docs.docker.com/engine/security/seccomp/
Page 279
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 280
5.7.3 Apply Security Context to Your Pods and Containers
(Manual)
Profile Applicability:
A security context defines the operating system security settings (uid, gid, capabilities,
SELinux role, etc..) applied to a container. When designing your containers and pods,
make sure that you configure the security context for your pods, containers, and
volumes. A security context is a property defined in the deployment yaml. It controls the
security parameters that will be assigned to the pod/container/volume. There are two
levels of security context: pod level security context, and container level security
context.
Impact:
If you incorrectly apply security contexts, you may have trouble running the pods.
Audit:
Review the pod definitions in your cluster and verify that you have security contexts
defined as appropriate.
Remediation:
Follow the Kubernetes documentation and apply security contexts to your pods. For a
suggested list of security contexts, you may refer to the CIS Security Benchmark for
Docker Containers.
Default Value:
By default, no security contexts are automatically applied to pods.
References:
1. https://kubernetes.io/docs/concepts/policy/security-context/
2. https://learn.cisecurity.org/benchmarks
Page 281
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 282
5.7.4 The default namespace should not be used (Manual)
Profile Applicability:
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 283
Controls
Control IG 1 IG 2 IG 3
Version
Page 284
Appendix: Summary Table
CIS Benchmark Recommendation Set
Correctly
Yes No
Page 285
CIS Benchmark Recommendation Set
Correctly
Yes No
1.1.11 Ensure that the etcd data directory permissions are set o o
to 700 or more restrictive (Automated)
1.1.21 Ensure that the Kubernetes PKI key file permissions are o o
set to 600 (Manual)
Page 286
CIS Benchmark Recommendation Set
Correctly
Yes No
Page 287
CIS Benchmark Recommendation Set
Correctly
Yes No
Page 288
CIS Benchmark Recommendation Set
Correctly
Yes No
1.2.31 Ensure that the API Server only makes use of Strong o o
Cryptographic Ciphers (Manual)
1.4 Scheduler
2 etcd
Page 289
CIS Benchmark Recommendation Set
Correctly
Yes No
3.2 Logging
3.2.2 Ensure that the audit policy covers key security concerns o o
(Manual)
4 Worker Nodes
4.1.1 Ensure that the kubelet service file permissions are set o o
to 600 or more restrictive (Automated)
Page 290
CIS Benchmark Recommendation Set
Correctly
Yes No
4.2 Kubelet
Page 291
CIS Benchmark Recommendation Set
Correctly
Yes No
5 Policies
Page 292
CIS Benchmark Recommendation Set
Correctly
Yes No
5.2.1 Ensure that the cluster has at least one active policy o o
control mechanism in place (Manual)
Page 293
CIS Benchmark Recommendation Set
Correctly
Yes No
Page 294
CIS Benchmark Recommendation Set
Correctly
Yes No
Page 295
Appendix: CIS Controls v7 IG 1 Mapped
Recommendations
Recommendation Set
Correctly
Yes No
1.1.1 Ensure that the API server pod specification file
o o
permissions are set to 600 or more restrictive
1.1.3 Ensure that the controller manager pod specification file
o o
permissions are set to 600 or more restrictive
1.1.5 Ensure that the scheduler pod specification file
o o
permissions are set to 600 or more restrictive
1.1.7 Ensure that the etcd pod specification file permissions
o o
are set to 600 or more restrictive
1.1.9 Ensure that the Container Network Interface file
o o
permissions are set to 600 or more restrictive
1.1.11 Ensure that the etcd data directory permissions are set to
o o
700 or more restrictive
1.1.13 Ensure that the admin.conf file permissions are set to
o o
600
1.1.15 Ensure that the scheduler.conf file permissions are set to
o o
600 or more restrictive
1.1.17 Ensure that the controller-manager.conf file permissions
o o
are set to 600 or more restrictive
1.1.19 Ensure that the Kubernetes PKI directory and file
o o
ownership is set to root:root
1.1.21 Ensure that the Kubernetes PKI key file permissions are
o o
set to 600
1.2.1 Ensure that the --anonymous-auth argument is set to
o o
false
1.2.8 Ensure that the --authorization-mode argument includes
o o
RBAC
1.2.10 Ensure that the admission control plugin AlwaysAdmit is
o o
not set
1.2.11 Ensure that the admission control plugin
o o
AlwaysPullImages is set
Page 296
Recommendation Set
Correctly
Yes No
1.2.13 Ensure that the admission control plugin ServiceAccount
o o
is set
1.2.14 Ensure that the admission control plugin
o o
NamespaceLifecycle is set
1.2.18 Ensure that the --audit-log-path argument is set o o
1.2.22 Ensure that the --request-timeout argument is set as
o o
appropriate
1.2.31 Ensure that the API Server only makes use of Strong
o o
Cryptographic Ciphers
1.3.1 Ensure that the --terminated-pod-gc-threshold argument
o o
is set as appropriate
2.5 Ensure that the --peer-client-cert-auth argument is set to
o o
true
3.2.1 Ensure that a minimal audit policy is created o o
4.1.1 Ensure that the kubelet service file permissions are set to
o o
600 or more restrictive
4.1.3 If proxy kubeconfig file exists ensure permissions are set
o o
to 600 or more restrictive
4.1.5 Ensure that the --kubeconfig kubelet.conf file permissions
o o
are set to 600 or more restrictive
4.1.7 Ensure that the certificate authorities file permissions are
o o
set to 600 or more restrictive
4.1.9 If the kubelet config.yaml configuration file is being used
o o
validate permissions set to 600 or more restrictive
4.2.1 Ensure that the --anonymous-auth argument is set to
o o
false
4.2.8 Ensure that the eventRecordQPS argument is set to a
o o
level which ensures appropriate event capture
4.2.12 Ensure that the Kubelet only makes use of Strong
o o
Cryptographic Ciphers
5.1.1 Ensure that the cluster-admin role is only used where
o o
required
5.1.5 Ensure that default service accounts are not actively
o o
used.
5.7.3 Apply Security Context to Your Pods and Containers o o
Page 297
Page 298
Appendix: CIS Controls v7 IG 2 Mapped
Recommendations
Recommendation Set
Correctly
Yes No
1.1.1 Ensure that the API server pod specification file
o o
permissions are set to 600 or more restrictive
1.1.3 Ensure that the controller manager pod specification file
o o
permissions are set to 600 or more restrictive
1.1.5 Ensure that the scheduler pod specification file
o o
permissions are set to 600 or more restrictive
1.1.7 Ensure that the etcd pod specification file permissions
o o
are set to 600 or more restrictive
1.1.9 Ensure that the Container Network Interface file
o o
permissions are set to 600 or more restrictive
1.1.11 Ensure that the etcd data directory permissions are set to
o o
700 or more restrictive
1.1.13 Ensure that the admin.conf file permissions are set to
o o
600
1.1.15 Ensure that the scheduler.conf file permissions are set to
o o
600 or more restrictive
1.1.17 Ensure that the controller-manager.conf file permissions
o o
are set to 600 or more restrictive
1.1.19 Ensure that the Kubernetes PKI directory and file
o o
ownership is set to root:root
1.1.21 Ensure that the Kubernetes PKI key file permissions are
o o
set to 600
1.2.1 Ensure that the --anonymous-auth argument is set to
o o
false
1.2.2 Ensure that the --token-auth-file parameter is not set o o
1.2.3 Ensure that the DenyServiceExternalIPs is set o o
1.2.6 Ensure that the --authorization-mode argument is not set
o o
to AlwaysAllow
1.2.7 Ensure that the --authorization-mode argument includes
o o
Node
Page 299
Recommendation Set
Correctly
Yes No
1.2.8 Ensure that the --authorization-mode argument includes
o o
RBAC
1.2.9 Ensure that the admission control plugin EventRateLimit
o o
is set
1.2.10 Ensure that the admission control plugin AlwaysAdmit is
o o
not set
1.2.11 Ensure that the admission control plugin
o o
AlwaysPullImages is set
1.2.13 Ensure that the admission control plugin ServiceAccount
o o
is set
1.2.14 Ensure that the admission control plugin
o o
NamespaceLifecycle is set
1.2.16 Ensure that the --secure-port argument is not set to 0 -
NoteThis recommendation is obsolete and will be deleted o o
per the consensus process.
1.2.18 Ensure that the --audit-log-path argument is set o o
1.2.19 Ensure that the --audit-log-maxage argument is set to 30
o o
or as appropriate
1.2.20 Ensure that the --audit-log-maxbackup argument is set to
o o
10 or as appropriate
1.2.21 Ensure that the --audit-log-maxsize argument is set to
o o
100 or as appropriate
1.2.22 Ensure that the --request-timeout argument is set as
o o
appropriate
1.2.24 Ensure that the --service-account-key-file argument is set
o o
as appropriate
1.2.26 Ensure that the --tls-cert-file and --tls-private-key-file
o o
arguments are set as appropriate
1.2.27 Ensure that the --client-ca-file argument is set as
o o
appropriate
1.2.31 Ensure that the API Server only makes use of Strong
o o
Cryptographic Ciphers
1.3.1 Ensure that the --terminated-pod-gc-threshold argument
o o
is set as appropriate
1.3.2 Ensure that the --profiling argument is set to false o o
Page 300
Recommendation Set
Correctly
Yes No
1.3.3 Ensure that the --use-service-account-credentials
o o
argument is set to true
1.3.4 Ensure that the --service-account-private-key-file
o o
argument is set as appropriate
1.3.5 Ensure that the --root-ca-file argument is set as
o o
appropriate
1.3.6 Ensure that the RotateKubeletServerCertificate argument
o o
is set to true
1.3.7 Ensure that the --bind-address argument is set to
o o
127.0.0.1
1.4.1 Ensure that the --profiling argument is set to false o o
1.4.2 Ensure that the --bind-address argument is set to
o o
127.0.0.1
2.1 Ensure that the --cert-file and --key-file arguments are set
o o
as appropriate
2.3 Ensure that the --auto-tls argument is not set to true o o
2.4 Ensure that the --peer-cert-file and --peer-key-file
o o
arguments are set as appropriate
2.5 Ensure that the --peer-client-cert-auth argument is set to
o o
true
2.6 Ensure that the --peer-auto-tls argument is not set to true o o
3.1.1 Client certificate authentication should not be used for
o o
users
3.1.2 Service account token authentication should not be used
o o
for users
3.1.3 Bootstrap token authentication should not be used for
o o
users
3.2.1 Ensure that a minimal audit policy is created o o
4.1.1 Ensure that the kubelet service file permissions are set to
o o
600 or more restrictive
4.1.3 If proxy kubeconfig file exists ensure permissions are set
o o
to 600 or more restrictive
4.1.5 Ensure that the --kubeconfig kubelet.conf file permissions
o o
are set to 600 or more restrictive
Page 301
Recommendation Set
Correctly
Yes No
4.1.7 Ensure that the certificate authorities file permissions are
o o
set to 600 or more restrictive
4.1.9 If the kubelet config.yaml configuration file is being used
o o
validate permissions set to 600 or more restrictive
4.2.1 Ensure that the --anonymous-auth argument is set to
o o
false
4.2.2 Ensure that the --authorization-mode argument is not set
o o
to AlwaysAllow
4.2.3 Ensure that the --client-ca-file argument is set as
o o
appropriate
4.2.4 Verify that the --read-only-port argument is set to 0 o o
4.2.5 Ensure that the --streaming-connection-idle-timeout
o o
argument is not set to 0
4.2.8 Ensure that the eventRecordQPS argument is set to a
o o
level which ensures appropriate event capture
4.2.9 Ensure that the --tls-cert-file and --tls-private-key-file
o o
arguments are set as appropriate
4.2.10 Ensure that the --rotate-certificates argument is not set to
o o
false
4.2.11 Verify that the RotateKubeletServerCertificate argument
o o
is set to true
4.2.12 Ensure that the Kubelet only makes use of Strong
o o
Cryptographic Ciphers
5.1.1 Ensure that the cluster-admin role is only used where
o o
required
5.1.5 Ensure that default service accounts are not actively
o o
used.
5.2.4 Minimize the admission of containers wishing to share
o o
the host IPC namespace
5.2.5 Minimize the admission of containers wishing to share
o o
the host network namespace
5.2.8 Minimize the admission of containers with the NET_RAW
o o
capability
5.2.9 Minimize the admission of containers with added
o o
capabilities
Page 302
Recommendation Set
Correctly
Yes No
5.2.10 Minimize the admission of containers with capabilities
o o
assigned
5.3.2 Ensure that all Namespaces have Network Policies
o o
defined
5.5.1 Configure Image Provenance using
o o
ImagePolicyWebhook admission controller
5.7.2 Ensure that the seccomp profile is set to docker/default in
o o
your pod definitions
5.7.3 Apply Security Context to Your Pods and Containers o o
Page 303
Appendix: CIS Controls v7 IG 3 Mapped
Recommendations
Recommendation Set
Correctly
Yes No
1.1.1 Ensure that the API server pod specification file
o o
permissions are set to 600 or more restrictive
1.1.3 Ensure that the controller manager pod specification file
o o
permissions are set to 600 or more restrictive
1.1.5 Ensure that the scheduler pod specification file
o o
permissions are set to 600 or more restrictive
1.1.7 Ensure that the etcd pod specification file permissions
o o
are set to 600 or more restrictive
1.1.9 Ensure that the Container Network Interface file
o o
permissions are set to 600 or more restrictive
1.1.11 Ensure that the etcd data directory permissions are set to
o o
700 or more restrictive
1.1.13 Ensure that the admin.conf file permissions are set to
o o
600
1.1.15 Ensure that the scheduler.conf file permissions are set to
o o
600 or more restrictive
1.1.17 Ensure that the controller-manager.conf file permissions
o o
are set to 600 or more restrictive
1.1.19 Ensure that the Kubernetes PKI directory and file
o o
ownership is set to root:root
1.1.21 Ensure that the Kubernetes PKI key file permissions are
o o
set to 600
1.2.1 Ensure that the --anonymous-auth argument is set to
o o
false
1.2.2 Ensure that the --token-auth-file parameter is not set o o
1.2.3 Ensure that the DenyServiceExternalIPs is set o o
1.2.6 Ensure that the --authorization-mode argument is not set
o o
to AlwaysAllow
1.2.7 Ensure that the --authorization-mode argument includes
o o
Node
Page 304
Recommendation Set
Correctly
Yes No
1.2.8 Ensure that the --authorization-mode argument includes
o o
RBAC
1.2.9 Ensure that the admission control plugin EventRateLimit
o o
is set
1.2.10 Ensure that the admission control plugin AlwaysAdmit is
o o
not set
1.2.11 Ensure that the admission control plugin
o o
AlwaysPullImages is set
1.2.13 Ensure that the admission control plugin ServiceAccount
o o
is set
1.2.14 Ensure that the admission control plugin
o o
NamespaceLifecycle is set
1.2.15 Ensure that the admission control plugin NodeRestriction
o o
is set
1.2.16 Ensure that the --secure-port argument is not set to 0 -
NoteThis recommendation is obsolete and will be deleted o o
per the consensus process.
1.2.18 Ensure that the --audit-log-path argument is set o o
1.2.19 Ensure that the --audit-log-maxage argument is set to 30
o o
or as appropriate
1.2.20 Ensure that the --audit-log-maxbackup argument is set to
o o
10 or as appropriate
1.2.21 Ensure that the --audit-log-maxsize argument is set to
o o
100 or as appropriate
1.2.22 Ensure that the --request-timeout argument is set as
o o
appropriate
1.2.24 Ensure that the --service-account-key-file argument is set
o o
as appropriate
1.2.25 Ensure that the --etcd-certfile and --etcd-keyfile
o o
arguments are set as appropriate
1.2.26 Ensure that the --tls-cert-file and --tls-private-key-file
o o
arguments are set as appropriate
1.2.27 Ensure that the --client-ca-file argument is set as
o o
appropriate
1.2.28 Ensure that the --etcd-cafile argument is set as
o o
appropriate
Page 305
Recommendation Set
Correctly
Yes No
1.2.29 Ensure that the --encryption-provider-config argument is
o o
set as appropriate
1.2.30 Ensure that encryption providers are appropriately
o o
configured
1.2.31 Ensure that the API Server only makes use of Strong
o o
Cryptographic Ciphers
1.3.1 Ensure that the --terminated-pod-gc-threshold argument
o o
is set as appropriate
1.3.2 Ensure that the --profiling argument is set to false o o
1.3.3 Ensure that the --use-service-account-credentials
o o
argument is set to true
1.3.4 Ensure that the --service-account-private-key-file
o o
argument is set as appropriate
1.3.5 Ensure that the --root-ca-file argument is set as
o o
appropriate
1.3.6 Ensure that the RotateKubeletServerCertificate argument
o o
is set to true
1.3.7 Ensure that the --bind-address argument is set to
o o
127.0.0.1
1.4.1 Ensure that the --profiling argument is set to false o o
1.4.2 Ensure that the --bind-address argument is set to
o o
127.0.0.1
2.1 Ensure that the --cert-file and --key-file arguments are set
o o
as appropriate
2.2 Ensure that the --client-cert-auth argument is set to true o o
2.3 Ensure that the --auto-tls argument is not set to true o o
2.4 Ensure that the --peer-cert-file and --peer-key-file
o o
arguments are set as appropriate
2.5 Ensure that the --peer-client-cert-auth argument is set to
o o
true
2.6 Ensure that the --peer-auto-tls argument is not set to true o o
3.1.1 Client certificate authentication should not be used for
o o
users
3.1.2 Service account token authentication should not be used
o o
for users
Page 306
Recommendation Set
Correctly
Yes No
3.1.3 Bootstrap token authentication should not be used for
o o
users
3.2.1 Ensure that a minimal audit policy is created o o
3.2.2 Ensure that the audit policy covers key security concerns o o
4.1.1 Ensure that the kubelet service file permissions are set to
o o
600 or more restrictive
4.1.3 If proxy kubeconfig file exists ensure permissions are set
o o
to 600 or more restrictive
4.1.5 Ensure that the --kubeconfig kubelet.conf file permissions
o o
are set to 600 or more restrictive
4.1.7 Ensure that the certificate authorities file permissions are
o o
set to 600 or more restrictive
4.1.9 If the kubelet config.yaml configuration file is being used
o o
validate permissions set to 600 or more restrictive
4.2.1 Ensure that the --anonymous-auth argument is set to
o o
false
4.2.2 Ensure that the --authorization-mode argument is not set
o o
to AlwaysAllow
4.2.3 Ensure that the --client-ca-file argument is set as
o o
appropriate
4.2.4 Verify that the --read-only-port argument is set to 0 o o
4.2.5 Ensure that the --streaming-connection-idle-timeout
o o
argument is not set to 0
4.2.8 Ensure that the eventRecordQPS argument is set to a
o o
level which ensures appropriate event capture
4.2.9 Ensure that the --tls-cert-file and --tls-private-key-file
o o
arguments are set as appropriate
4.2.10 Ensure that the --rotate-certificates argument is not set to
o o
false
4.2.11 Verify that the RotateKubeletServerCertificate argument
o o
is set to true
4.2.12 Ensure that the Kubelet only makes use of Strong
o o
Cryptographic Ciphers
5.1.1 Ensure that the cluster-admin role is only used where
o o
required
Page 307
Recommendation Set
Correctly
Yes No
5.1.5 Ensure that default service accounts are not actively
o o
used.
5.2.3 Minimize the admission of containers wishing to share
o o
the host process ID namespace
5.2.4 Minimize the admission of containers wishing to share
o o
the host IPC namespace
5.2.5 Minimize the admission of containers wishing to share
o o
the host network namespace
5.2.8 Minimize the admission of containers with the NET_RAW
o o
capability
5.2.9 Minimize the admission of containers with added
o o
capabilities
5.2.10 Minimize the admission of containers with capabilities
o o
assigned
5.3.1 Ensure that the CNI in use supports Network Policies o o
5.3.2 Ensure that all Namespaces have Network Policies
o o
defined
5.5.1 Configure Image Provenance using
o o
ImagePolicyWebhook admission controller
5.7.2 Ensure that the seccomp profile is set to docker/default in
o o
your pod definitions
5.7.3 Apply Security Context to Your Pods and Containers o o
5.7.4 The default namespace should not be used o o
Page 308
Appendix: CIS Controls v7 Unmapped
Recommendations
Recommendation Set
Correctly
Yes No
2.7 Ensure that a unique Certificate Authority is used for etcd o o
4.2.13 Ensure that a limit is set on pod PIDs o o
5.2.1 Ensure that the cluster has at least one active policy
o o
control mechanism in place
5.2.11 Minimize the admission of Windows HostProcess
o o
Containers
5.2.12 Minimize the admission of HostPath volumes o o
5.2.13 Minimize the admission of containers which use
o o
HostPorts
Page 309
Appendix: CIS Controls v8 IG 1 Mapped
Recommendations
Recommendation Set
Correctly
Yes No
1.1.1 Ensure that the API server pod specification file
o o
permissions are set to 600 or more restrictive
1.1.2 Ensure that the API server pod specification file
o o
ownership is set to root:root
1.1.3 Ensure that the controller manager pod specification file
o o
permissions are set to 600 or more restrictive
1.1.4 Ensure that the controller manager pod specification file
o o
ownership is set to root:root
1.1.5 Ensure that the scheduler pod specification file
o o
permissions are set to 600 or more restrictive
1.1.6 Ensure that the scheduler pod specification file
o o
ownership is set to root:root
1.1.7 Ensure that the etcd pod specification file permissions
o o
are set to 600 or more restrictive
1.1.8 Ensure that the etcd pod specification file ownership is
o o
set to root:root
1.1.9 Ensure that the Container Network Interface file
o o
permissions are set to 600 or more restrictive
1.1.10 Ensure that the Container Network Interface file
o o
ownership is set to root:root
1.1.11 Ensure that the etcd data directory permissions are set to
o o
700 or more restrictive
1.1.12 Ensure that the etcd data directory ownership is set to
o o
etcd:etcd
1.1.13 Ensure that the admin.conf file permissions are set to
o o
600
1.1.14 Ensure that the admin.conf file ownership is set to
o o
root:root
1.1.15 Ensure that the scheduler.conf file permissions are set to
o o
600 or more restrictive
Page 310
Recommendation Set
Correctly
Yes No
1.1.16 Ensure that the scheduler.conf file ownership is set to
o o
root:root
1.1.17 Ensure that the controller-manager.conf file permissions
o o
are set to 600 or more restrictive
1.1.18 Ensure that the controller-manager.conf file ownership is
o o
set to root:root
1.1.19 Ensure that the Kubernetes PKI directory and file
o o
ownership is set to root:root
1.1.20 Ensure that the Kubernetes PKI certificate file
o o
permissions are set to 600 or more restrictive
1.1.21 Ensure that the Kubernetes PKI key file permissions are
o o
set to 600
1.2.1 Ensure that the --anonymous-auth argument is set to
o o
false
1.2.2 Ensure that the --token-auth-file parameter is not set o o
1.2.3 Ensure that the DenyServiceExternalIPs is set o o
1.2.6 Ensure that the --authorization-mode argument is not set
o o
to AlwaysAllow
1.2.7 Ensure that the --authorization-mode argument includes
o o
Node
1.2.10 Ensure that the admission control plugin AlwaysAdmit is
o o
not set
1.2.11 Ensure that the admission control plugin
o o
AlwaysPullImages is set
1.2.13 Ensure that the admission control plugin ServiceAccount
o o
is set
1.2.18 Ensure that the --audit-log-path argument is set o o
1.2.19 Ensure that the --audit-log-maxage argument is set to 30
o o
or as appropriate
1.2.20 Ensure that the --audit-log-maxbackup argument is set to
o o
10 or as appropriate
1.2.21 Ensure that the --audit-log-maxsize argument is set to
o o
100 or as appropriate
1.2.23 Ensure that the --service-account-lookup argument is set
o o
to true
Page 311
Recommendation Set
Correctly
Yes No
1.2.24 Ensure that the --service-account-key-file argument is set
o o
as appropriate
1.3.3 Ensure that the --use-service-account-credentials
o o
argument is set to true
1.3.4 Ensure that the --service-account-private-key-file
o o
argument is set as appropriate
2.5 Ensure that the --peer-client-cert-auth argument is set to
o o
true
2.6 Ensure that the --peer-auto-tls argument is not set to true o o
2.7 Ensure that a unique Certificate Authority is used for etcd o o
3.1.1 Client certificate authentication should not be used for
o o
users
3.1.2 Service account token authentication should not be used
o o
for users
3.1.3 Bootstrap token authentication should not be used for
o o
users
3.2.1 Ensure that a minimal audit policy is created o o
4.1.1 Ensure that the kubelet service file permissions are set to
o o
600 or more restrictive
4.1.2 Ensure that the kubelet service file ownership is set to
o o
root:root
4.1.3 If proxy kubeconfig file exists ensure permissions are set
o o
to 600 or more restrictive
4.1.4 If proxy kubeconfig file exists ensure ownership is set to
o o
root:root
4.1.5 Ensure that the --kubeconfig kubelet.conf file permissions
o o
are set to 600 or more restrictive
4.1.6 Ensure that the --kubeconfig kubelet.conf file ownership
o o
is set to root:root
4.1.7 Ensure that the certificate authorities file permissions are
o o
set to 600 or more restrictive
4.1.8 Ensure that the client certificate authorities file ownership
o o
is set to root:root
4.1.9 If the kubelet config.yaml configuration file is being used
o o
validate permissions set to 600 or more restrictive
Page 312
Recommendation Set
Correctly
Yes No
4.1.10 If the kubelet config.yaml configuration file is being used
o o
validate file ownership is set to root:root
4.2.1 Ensure that the --anonymous-auth argument is set to
o o
false
4.2.2 Ensure that the --authorization-mode argument is not set
o o
to AlwaysAllow
4.2.8 Ensure that the eventRecordQPS argument is set to a
o o
level which ensures appropriate event capture
5.1.5 Ensure that default service accounts are not actively
o o
used.
5.1.7 Avoid use of system:masters group o o
5.1.8 Limit use of the Bind, Impersonate and Escalate
o o
permissions in the Kubernetes cluster
5.2.2 Minimize the admission of privileged containers o o
5.2.6 Minimize the admission of containers with
o o
allowPrivilegeEscalation
5.2.7 Minimize the admission of root containers o o
5.3.1 Ensure that the CNI in use supports Network Policies o o
5.3.2 Ensure that all Namespaces have Network Policies
o o
defined
Page 313
Appendix: CIS Controls v8 IG 2 Mapped
Recommendations
Recommendation Set
Correctly
Yes No
1.1.1 Ensure that the API server pod specification file
o o
permissions are set to 600 or more restrictive
1.1.2 Ensure that the API server pod specification file
o o
ownership is set to root:root
1.1.3 Ensure that the controller manager pod specification file
o o
permissions are set to 600 or more restrictive
1.1.4 Ensure that the controller manager pod specification file
o o
ownership is set to root:root
1.1.5 Ensure that the scheduler pod specification file
o o
permissions are set to 600 or more restrictive
1.1.6 Ensure that the scheduler pod specification file
o o
ownership is set to root:root
1.1.7 Ensure that the etcd pod specification file permissions
o o
are set to 600 or more restrictive
1.1.8 Ensure that the etcd pod specification file ownership is
o o
set to root:root
1.1.9 Ensure that the Container Network Interface file
o o
permissions are set to 600 or more restrictive
1.1.10 Ensure that the Container Network Interface file
o o
ownership is set to root:root
1.1.11 Ensure that the etcd data directory permissions are set to
o o
700 or more restrictive
1.1.12 Ensure that the etcd data directory ownership is set to
o o
etcd:etcd
1.1.13 Ensure that the admin.conf file permissions are set to
o o
600
1.1.14 Ensure that the admin.conf file ownership is set to
o o
root:root
1.1.15 Ensure that the scheduler.conf file permissions are set to
o o
600 or more restrictive
Page 314
Recommendation Set
Correctly
Yes No
1.1.16 Ensure that the scheduler.conf file ownership is set to
o o
root:root
1.1.17 Ensure that the controller-manager.conf file permissions
o o
are set to 600 or more restrictive
1.1.18 Ensure that the controller-manager.conf file ownership is
o o
set to root:root
1.1.19 Ensure that the Kubernetes PKI directory and file
o o
ownership is set to root:root
1.1.20 Ensure that the Kubernetes PKI certificate file
o o
permissions are set to 600 or more restrictive
1.1.21 Ensure that the Kubernetes PKI key file permissions are
o o
set to 600
1.2.1 Ensure that the --anonymous-auth argument is set to
o o
false
1.2.2 Ensure that the --token-auth-file parameter is not set o o
1.2.3 Ensure that the DenyServiceExternalIPs is set o o
1.2.4 Ensure that the --kubelet-client-certificate and --kubelet-
o o
client-key arguments are set as appropriate
1.2.5 Ensure that the --kubelet-certificate-authority argument is
o o
set as appropriate
1.2.6 Ensure that the --authorization-mode argument is not set
o o
to AlwaysAllow
1.2.7 Ensure that the --authorization-mode argument includes
o o
Node
1.2.9 Ensure that the admission control plugin EventRateLimit
o o
is set
1.2.10 Ensure that the admission control plugin AlwaysAdmit is
o o
not set
1.2.11 Ensure that the admission control plugin
o o
AlwaysPullImages is set
1.2.12 Ensure that the admission control plugin
SecurityContextDeny is set if PodSecurityPolicy is not o o
used
1.2.13 Ensure that the admission control plugin ServiceAccount
o o
is set
Page 315
Recommendation Set
Correctly
Yes No
1.2.16 Ensure that the --secure-port argument is not set to 0 -
NoteThis recommendation is obsolete and will be deleted o o
per the consensus process.
1.2.18 Ensure that the --audit-log-path argument is set o o
1.2.19 Ensure that the --audit-log-maxage argument is set to 30
o o
or as appropriate
1.2.20 Ensure that the --audit-log-maxbackup argument is set to
o o
10 or as appropriate
1.2.21 Ensure that the --audit-log-maxsize argument is set to
o o
100 or as appropriate
1.2.23 Ensure that the --service-account-lookup argument is set
o o
to true
1.2.24 Ensure that the --service-account-key-file argument is set
o o
as appropriate
1.2.25 Ensure that the --etcd-certfile and --etcd-keyfile
o o
arguments are set as appropriate
1.2.26 Ensure that the --tls-cert-file and --tls-private-key-file
o o
arguments are set as appropriate
1.2.27 Ensure that the --client-ca-file argument is set as
o o
appropriate
1.2.28 Ensure that the --etcd-cafile argument is set as
o o
appropriate
1.2.29 Ensure that the --encryption-provider-config argument is
o o
set as appropriate
1.2.30 Ensure that encryption providers are appropriately
o o
configured
1.2.31 Ensure that the API Server only makes use of Strong
o o
Cryptographic Ciphers
1.3.1 Ensure that the --terminated-pod-gc-threshold argument
o o
is set as appropriate
1.3.2 Ensure that the --profiling argument is set to false o o
1.3.3 Ensure that the --use-service-account-credentials
o o
argument is set to true
1.3.4 Ensure that the --service-account-private-key-file
o o
argument is set as appropriate
Page 316
Recommendation Set
Correctly
Yes No
1.3.5 Ensure that the --root-ca-file argument is set as
o o
appropriate
1.3.6 Ensure that the RotateKubeletServerCertificate argument
o o
is set to true
1.3.7 Ensure that the --bind-address argument is set to
o o
127.0.0.1
1.4.1 Ensure that the --profiling argument is set to false o o
1.4.2 Ensure that the --bind-address argument is set to
o o
127.0.0.1
2.1 Ensure that the --cert-file and --key-file arguments are set
o o
as appropriate
2.2 Ensure that the --client-cert-auth argument is set to true o o
2.3 Ensure that the --auto-tls argument is not set to true o o
2.4 Ensure that the --peer-cert-file and --peer-key-file
o o
arguments are set as appropriate
2.5 Ensure that the --peer-client-cert-auth argument is set to
o o
true
2.6 Ensure that the --peer-auto-tls argument is not set to true o o
2.7 Ensure that a unique Certificate Authority is used for etcd o o
3.1.1 Client certificate authentication should not be used for
o o
users
3.1.2 Service account token authentication should not be used
o o
for users
3.1.3 Bootstrap token authentication should not be used for
o o
users
3.2.1 Ensure that a minimal audit policy is created o o
3.2.2 Ensure that the audit policy covers key security concerns o o
4.1.1 Ensure that the kubelet service file permissions are set to
o o
600 or more restrictive
4.1.2 Ensure that the kubelet service file ownership is set to
o o
root:root
4.1.3 If proxy kubeconfig file exists ensure permissions are set
o o
to 600 or more restrictive
4.1.4 If proxy kubeconfig file exists ensure ownership is set to
o o
root:root
Page 317
Recommendation Set
Correctly
Yes No
4.1.5 Ensure that the --kubeconfig kubelet.conf file permissions
o o
are set to 600 or more restrictive
4.1.6 Ensure that the --kubeconfig kubelet.conf file ownership
o o
is set to root:root
4.1.7 Ensure that the certificate authorities file permissions are
o o
set to 600 or more restrictive
4.1.8 Ensure that the client certificate authorities file ownership
o o
is set to root:root
4.1.9 If the kubelet config.yaml configuration file is being used
o o
validate permissions set to 600 or more restrictive
4.1.10 If the kubelet config.yaml configuration file is being used
o o
validate file ownership is set to root:root
4.2.1 Ensure that the --anonymous-auth argument is set to
o o
false
4.2.2 Ensure that the --authorization-mode argument is not set
o o
to AlwaysAllow
4.2.3 Ensure that the --client-ca-file argument is set as
o o
appropriate
4.2.4 Verify that the --read-only-port argument is set to 0 o o
4.2.5 Ensure that the --streaming-connection-idle-timeout
o o
argument is not set to 0
4.2.6 Ensure that the --make-iptables-util-chains argument is
o o
set to true
4.2.8 Ensure that the eventRecordQPS argument is set to a
o o
level which ensures appropriate event capture
4.2.9 Ensure that the --tls-cert-file and --tls-private-key-file
o o
arguments are set as appropriate
4.2.10 Ensure that the --rotate-certificates argument is not set to
o o
false
4.2.11 Verify that the RotateKubeletServerCertificate argument
o o
is set to true
4.2.12 Ensure that the Kubelet only makes use of Strong
o o
Cryptographic Ciphers
5.1.5 Ensure that default service accounts are not actively
o o
used.
5.1.7 Avoid use of system:masters group o o
Page 318
Recommendation Set
Correctly
Yes No
5.1.8 Limit use of the Bind, Impersonate and Escalate
o o
permissions in the Kubernetes cluster
5.2.2 Minimize the admission of privileged containers o o
5.2.4 Minimize the admission of containers wishing to share
o o
the host IPC namespace
5.2.5 Minimize the admission of containers wishing to share
o o
the host network namespace
5.2.6 Minimize the admission of containers with
o o
allowPrivilegeEscalation
5.2.7 Minimize the admission of root containers o o
5.2.8 Minimize the admission of containers with the NET_RAW
o o
capability
5.2.9 Minimize the admission of containers with added
o o
capabilities
5.2.10 Minimize the admission of containers with capabilities
o o
assigned
5.3.1 Ensure that the CNI in use supports Network Policies o o
5.3.2 Ensure that all Namespaces have Network Policies
o o
defined
5.5.1 Configure Image Provenance using
o o
ImagePolicyWebhook admission controller
5.7.2 Ensure that the seccomp profile is set to docker/default in
o o
your pod definitions
5.7.4 The default namespace should not be used o o
Page 319
Appendix: CIS Controls v8 IG 3 Mapped
Recommendations
Recommendation Set
Correctly
Yes No
1.1.1 Ensure that the API server pod specification file
o o
permissions are set to 600 or more restrictive
1.1.2 Ensure that the API server pod specification file
o o
ownership is set to root:root
1.1.3 Ensure that the controller manager pod specification file
o o
permissions are set to 600 or more restrictive
1.1.4 Ensure that the controller manager pod specification file
o o
ownership is set to root:root
1.1.5 Ensure that the scheduler pod specification file
o o
permissions are set to 600 or more restrictive
1.1.6 Ensure that the scheduler pod specification file
o o
ownership is set to root:root
1.1.7 Ensure that the etcd pod specification file permissions
o o
are set to 600 or more restrictive
1.1.8 Ensure that the etcd pod specification file ownership is
o o
set to root:root
1.1.9 Ensure that the Container Network Interface file
o o
permissions are set to 600 or more restrictive
1.1.10 Ensure that the Container Network Interface file
o o
ownership is set to root:root
1.1.11 Ensure that the etcd data directory permissions are set to
o o
700 or more restrictive
1.1.12 Ensure that the etcd data directory ownership is set to
o o
etcd:etcd
1.1.13 Ensure that the admin.conf file permissions are set to
o o
600
1.1.14 Ensure that the admin.conf file ownership is set to
o o
root:root
1.1.15 Ensure that the scheduler.conf file permissions are set to
o o
600 or more restrictive
Page 320
Recommendation Set
Correctly
Yes No
1.1.16 Ensure that the scheduler.conf file ownership is set to
o o
root:root
1.1.17 Ensure that the controller-manager.conf file permissions
o o
are set to 600 or more restrictive
1.1.18 Ensure that the controller-manager.conf file ownership is
o o
set to root:root
1.1.19 Ensure that the Kubernetes PKI directory and file
o o
ownership is set to root:root
1.1.20 Ensure that the Kubernetes PKI certificate file
o o
permissions are set to 600 or more restrictive
1.1.21 Ensure that the Kubernetes PKI key file permissions are
o o
set to 600
1.2.1 Ensure that the --anonymous-auth argument is set to
o o
false
1.2.2 Ensure that the --token-auth-file parameter is not set o o
1.2.3 Ensure that the DenyServiceExternalIPs is set o o
1.2.4 Ensure that the --kubelet-client-certificate and --kubelet-
o o
client-key arguments are set as appropriate
1.2.5 Ensure that the --kubelet-certificate-authority argument is
o o
set as appropriate
1.2.6 Ensure that the --authorization-mode argument is not set
o o
to AlwaysAllow
1.2.7 Ensure that the --authorization-mode argument includes
o o
Node
1.2.8 Ensure that the --authorization-mode argument includes
o o
RBAC
1.2.9 Ensure that the admission control plugin EventRateLimit
o o
is set
1.2.10 Ensure that the admission control plugin AlwaysAdmit is
o o
not set
1.2.11 Ensure that the admission control plugin
o o
AlwaysPullImages is set
1.2.12 Ensure that the admission control plugin
SecurityContextDeny is set if PodSecurityPolicy is not o o
used
Page 321
Recommendation Set
Correctly
Yes No
1.2.13 Ensure that the admission control plugin ServiceAccount
o o
is set
1.2.15 Ensure that the admission control plugin NodeRestriction
o o
is set
1.2.16 Ensure that the --secure-port argument is not set to 0 -
NoteThis recommendation is obsolete and will be deleted o o
per the consensus process.
1.2.18 Ensure that the --audit-log-path argument is set o o
1.2.19 Ensure that the --audit-log-maxage argument is set to 30
o o
or as appropriate
1.2.20 Ensure that the --audit-log-maxbackup argument is set to
o o
10 or as appropriate
1.2.21 Ensure that the --audit-log-maxsize argument is set to
o o
100 or as appropriate
1.2.23 Ensure that the --service-account-lookup argument is set
o o
to true
1.2.24 Ensure that the --service-account-key-file argument is set
o o
as appropriate
1.2.25 Ensure that the --etcd-certfile and --etcd-keyfile
o o
arguments are set as appropriate
1.2.26 Ensure that the --tls-cert-file and --tls-private-key-file
o o
arguments are set as appropriate
1.2.27 Ensure that the --client-ca-file argument is set as
o o
appropriate
1.2.28 Ensure that the --etcd-cafile argument is set as
o o
appropriate
1.2.29 Ensure that the --encryption-provider-config argument is
o o
set as appropriate
1.2.30 Ensure that encryption providers are appropriately
o o
configured
1.2.31 Ensure that the API Server only makes use of Strong
o o
Cryptographic Ciphers
1.3.1 Ensure that the --terminated-pod-gc-threshold argument
o o
is set as appropriate
1.3.2 Ensure that the --profiling argument is set to false o o
Page 322
Recommendation Set
Correctly
Yes No
1.3.3 Ensure that the --use-service-account-credentials
o o
argument is set to true
1.3.4 Ensure that the --service-account-private-key-file
o o
argument is set as appropriate
1.3.5 Ensure that the --root-ca-file argument is set as
o o
appropriate
1.3.6 Ensure that the RotateKubeletServerCertificate argument
o o
is set to true
1.3.7 Ensure that the --bind-address argument is set to
o o
127.0.0.1
1.4.1 Ensure that the --profiling argument is set to false o o
1.4.2 Ensure that the --bind-address argument is set to
o o
127.0.0.1
2.1 Ensure that the --cert-file and --key-file arguments are set
o o
as appropriate
2.2 Ensure that the --client-cert-auth argument is set to true o o
2.3 Ensure that the --auto-tls argument is not set to true o o
2.4 Ensure that the --peer-cert-file and --peer-key-file
o o
arguments are set as appropriate
2.5 Ensure that the --peer-client-cert-auth argument is set to
o o
true
2.6 Ensure that the --peer-auto-tls argument is not set to true o o
2.7 Ensure that a unique Certificate Authority is used for etcd o o
3.1.1 Client certificate authentication should not be used for
o o
users
3.1.2 Service account token authentication should not be used
o o
for users
3.1.3 Bootstrap token authentication should not be used for
o o
users
3.2.1 Ensure that a minimal audit policy is created o o
3.2.2 Ensure that the audit policy covers key security concerns o o
4.1.1 Ensure that the kubelet service file permissions are set to
o o
600 or more restrictive
4.1.2 Ensure that the kubelet service file ownership is set to
o o
root:root
Page 323
Recommendation Set
Correctly
Yes No
4.1.3 If proxy kubeconfig file exists ensure permissions are set
o o
to 600 or more restrictive
4.1.4 If proxy kubeconfig file exists ensure ownership is set to
o o
root:root
4.1.5 Ensure that the --kubeconfig kubelet.conf file permissions
o o
are set to 600 or more restrictive
4.1.6 Ensure that the --kubeconfig kubelet.conf file ownership
o o
is set to root:root
4.1.7 Ensure that the certificate authorities file permissions are
o o
set to 600 or more restrictive
4.1.8 Ensure that the client certificate authorities file ownership
o o
is set to root:root
4.1.9 If the kubelet config.yaml configuration file is being used
o o
validate permissions set to 600 or more restrictive
4.1.10 If the kubelet config.yaml configuration file is being used
o o
validate file ownership is set to root:root
4.2.1 Ensure that the --anonymous-auth argument is set to
o o
false
4.2.2 Ensure that the --authorization-mode argument is not set
o o
to AlwaysAllow
4.2.3 Ensure that the --client-ca-file argument is set as
o o
appropriate
4.2.4 Verify that the --read-only-port argument is set to 0 o o
4.2.5 Ensure that the --streaming-connection-idle-timeout
o o
argument is not set to 0
4.2.6 Ensure that the --make-iptables-util-chains argument is
o o
set to true
4.2.8 Ensure that the eventRecordQPS argument is set to a
o o
level which ensures appropriate event capture
4.2.9 Ensure that the --tls-cert-file and --tls-private-key-file
o o
arguments are set as appropriate
4.2.10 Ensure that the --rotate-certificates argument is not set to
o o
false
4.2.11 Verify that the RotateKubeletServerCertificate argument
o o
is set to true
Page 324
Recommendation Set
Correctly
Yes No
4.2.12 Ensure that the Kubelet only makes use of Strong
o o
Cryptographic Ciphers
5.1.1 Ensure that the cluster-admin role is only used where
o o
required
5.1.3 Minimize wildcard use in Roles and ClusterRoles o o
5.1.4 Minimize access to create pods o o
5.1.5 Ensure that default service accounts are not actively
o o
used.
5.1.7 Avoid use of system:masters group o o
5.1.8 Limit use of the Bind, Impersonate and Escalate
o o
permissions in the Kubernetes cluster
5.1.9 Minimize access to create persistent volumes o o
5.1.10 Minimize access to the proxy sub-resource of nodes o o
5.1.11 Minimize access to the approval sub-resource of
o o
certificatesigningrequests objects
5.1.12 Minimize access to webhook configuration objects o o
5.1.13 Minimize access to the service account token creation o o
5.2.2 Minimize the admission of privileged containers o o
5.2.3 Minimize the admission of containers wishing to share
o o
the host process ID namespace
5.2.4 Minimize the admission of containers wishing to share
o o
the host IPC namespace
5.2.5 Minimize the admission of containers wishing to share
o o
the host network namespace
5.2.6 Minimize the admission of containers with
o o
allowPrivilegeEscalation
5.2.7 Minimize the admission of root containers o o
5.2.8 Minimize the admission of containers with the NET_RAW
o o
capability
5.2.9 Minimize the admission of containers with added
o o
capabilities
5.2.10 Minimize the admission of containers with capabilities
o o
assigned
5.3.1 Ensure that the CNI in use supports Network Policies o o
Page 325
Recommendation Set
Correctly
Yes No
5.3.2 Ensure that all Namespaces have Network Policies
o o
defined
5.5.1 Configure Image Provenance using
o o
ImagePolicyWebhook admission controller
5.7.2 Ensure that the seccomp profile is set to docker/default in
o o
your pod definitions
5.7.4 The default namespace should not be used o o
Page 326
Appendix: CIS Controls v8 Unmapped
Recommendations
Recommendation Set
Correctly
Yes No
4.2.13 Ensure that a limit is set on pod PIDs o o
5.2.1 Ensure that the cluster has at least one active policy
o o
control mechanism in place
5.2.11 Minimize the admission of Windows HostProcess
o o
Containers
5.2.12 Minimize the admission of HostPath volumes o o
5.2.13 Minimize the admission of containers which use
o o
HostPorts
Page 327
Appendix: Change History
Date Version Changes for this version
Page 328
Date Version Changes for this version
2/20/2023 1.7.0
2/20/2023 1.7.0
Page 329