1.3.3 Ensure that the --use-service-account-credentials argument is set to true (Automated)
Profile Applicability:
Level 1 - Master Node
Description:
Use individual service account credentials for each controller.
Rationale:
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-serviceaccount-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 kubesystem namespace automatically with default roles and rolebindings that are autoreconciled 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 controllerrole-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/kubecontroller-manager.yaml on the Control Plane node to set the below parameter.
--use-service-account-credentials=true
Default Value:
By default, --use-service-account-credentials is set to false.