A security scan reveals that the kubelet read-only port (typically port 1055) is active and exposes unauthenticated pod and cluster metadata. How should this vulnerability be remediated?
Trap 1: Configure an RBAC ClusterRoleBinding for system:anonymous.
RBAC does not control the kubelet read-only port, which bypasses normal API authorization.
Trap 2: Enable PodSecurityStandards in enforcing mode.
Pod Security Standards govern pod specs, not node-level daemon configurations.
Trap 3: Apply a NetworkPolicy blocking ingress traffic to port 1055.
NetworkPolicies do not protect host network ports on the node where kubelet runs.
- A
Configure an RBAC ClusterRoleBinding for system:anonymous.
Why it fails: RBAC does not control the kubelet read-only port, which bypasses normal API authorization.
- B
Enable PodSecurityStandards in enforcing mode.
Why it fails: Pod Security Standards govern pod specs, not node-level daemon configurations.
- C
Apply a NetworkPolicy blocking ingress traffic to port 1055.
Why it fails: NetworkPolicies do not protect host network ports on the node where kubelet runs.
- D
Set readOnlyPort: 0 in the kubelet configuration file.
Setting readOnlyPort to 0 disables the kubelet's unauthenticated read-only endpoint entirely, eliminating anonymous access to pod specs and cluster metadata. This directly closes the exposure the scan identified, since no authentication or authorisation was applied to that port.