Description
Set --kubelet-certificate-authority on kube-apiserver to the CA that issued the kubelet serving certificates. By default the API server does not verify these certificates when connecting to nodes.
Potential impact
Without verification, node-management requests such as log retrieval can reach the wrong endpoint. An incorrect CA or a certificate that does not cover the node address can also interrupt management operations.
Remediation
Mount the CA bundle where the API server can read it. Check that the certificate covers the DNS name or IP address used to contact kubelet. Test that trusted nodes can be reached and untrusted certificates are rejected. Configure kubelet to authenticate the API server’s requests and authorize the required operations.
Examples
Only the second Kubernetes 1.6.0 excerpt supplies a CA file. On a supported version, replace the example path with the mounted CA bundle.
Before
apiVersion: v1
kind: Pod
metadata:
name: command-demo
spec:
containers:
- name: command-demo-container
image: gcr.io/google_containers/kube-apiserver-amd64:v1.6.0
command: ["kube-apiserver"]
After
apiVersion: v1
kind: Pod
metadata:
name: command-demo
spec:
containers:
- name: command-demo-container
image: gcr.io/google_containers/kube-apiserver-amd64:v1.6.0
command: ["kube-apiserver"]
args: ["--kubelet-certificate-authority=/path/to/any/cert/file.pem"]