Individual controller service account credentials disabled

Without individual service account credentials, kube-controller-manager can give controllers broader permissions than they need.

Description

Set --use-service-account-credentials=true on kube-controller-manager to give each controller its own API credentials. The controllers still share a process.

Potential impact

With shared credentials, a mistaken API request may use permissions granted for a different controller.

Remediation

Check the RBAC bindings for each controller’s service account and grant only the actions it needs. After the change, confirm that each controller can still reconcile its resources.

Examples

The excerpts compare Kubernetes 1.6 arguments. Configure the controller manager for your supported version.

Before

yaml
apiVersion: v1
kind: Pod
metadata:
  name: command-demo
spec:
  containers:
    - name: command-demo-container
      image: gcr.io/google_containers/kube-controller-manager-amd64:v1.6.0
      command: ["kube-controller-manager", "--use-service-account-credentials=false"]
      args: []

After

yaml
apiVersion: v1
kind: Pod
metadata:
  name: command-demo
spec:
  containers:
    - name: command-demo-container
      image: gcr.io/google_containers/kube-controller-manager-amd64:v1.6.0
      command: ["kube-controller-manager"]
      args: ["--use-service-account-credentials=true"]

References