Skip to main content

More Info:

Disable the read-only port.

Risk Level

Medium

Address

Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CIS EKS
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, check how kubelet is configured:
If you see a --config flag (for example --config=/var/lib/kubelet/config.yaml), use the config file method (step 2). If you see --read-only-port on the command line or no --config flag, use the systemd arguments method (step 3).
  1. If using the kubelet config file on a worker node, edit /var/lib/kubelet/config.yaml and set readOnlyPort to 0 (create the key if missing), for example:
  1. If using executable arguments on a worker node, edit /etc/systemd/system/kubelet.service.d/10-kubelet-args.conf to ensure --read-only-port=0 is present in the kubelet arguments, for example:
  1. On every worker node where you changed configuration, reload systemd and restart kubelet (this will briefly disrupt pods on that node):
  1. Verify on every worker node that kubelet is running without a nonzero read-only port:
Confirm there is no --read-only-port flag with a value other than 0, and if a config file is in use, ensure readOnlyPort: 0 is set in /var/lib/kubelet/config.yaml.
kubectl cannot modify kubelet process flags or its host-level configuration file /var/lib/kubelet/config.yaml (or /etc/kubernetes/kubelet/kubelet-config.json). This setting must be changed directly on every worker node’s OS; see the Manual Steps section for how to update the kubelet configuration and restart the service.

Additional Reading: