Skip to main content

More Info:

Overriding the hostname can interfere with TLS certificate validation and cloud provider node identification. Leaving —hostname-override unset preserves consistent node identity.

Risk Level

Low

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, inspect the kubelet process arguments to confirm --hostname-override is in use:
  2. On every worker node, open the kubelet systemd drop-in file for editing:
  3. In that file, locate the line that defines extra kubelet arguments (for example KUBELET_SYSTEM_PODS_ARGS=... or an ExecStart= line) and remove the --hostname-override=... option entirely from the argument list. Save and exit.
  4. On every worker node, reload systemd configuration and restart the kubelet so the change takes effect:
  5. If /var/lib/kubelet/config.yaml contains a hostnameOverride: field, remove that line as well and restart kubelet again:
  6. Verification on every worker node: confirm the kubelet is running without --hostname-override in its arguments:
kubectl cannot change the kubelet’s --hostname-override setting because it is configured on each worker node’s host (via systemd units and kubelet config files), not through the Kubernetes API. To correct this finding, make the changes directly on the nodes as described in the Manual Steps section.