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
LowAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every worker node, inspect the kubelet process arguments to confirm
--hostname-overrideis in use: -
On every worker node, open the kubelet systemd drop-in file for editing:
-
In that file, locate the line that defines extra kubelet arguments (for example
KUBELET_SYSTEM_PODS_ARGS=...or anExecStart=line) and remove the--hostname-override=...option entirely from the argument list. Save and exit. -
On every worker node, reload systemd configuration and restart the kubelet so the change takes effect:
-
If
/var/lib/kubelet/config.yamlcontains ahostnameOverride:field, remove that line as well and restart kubelet again: -
Verification on every worker node: confirm the kubelet is running without
--hostname-overridein its arguments:
Using kubectl
Using kubectl
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.Automation
Automation

