· via dev.to (home feed)
Kubernetes kubelet read-only port offers unauthenticated path to full cluster inventory
A dev.to post explains how kubelet's read-only port serves pod and node details without authentication, why the setting survives in many clusters, and how to audit and disable it.

A post on dev.to draws attention to a Kubernetes hardening gap that is easy to miss: the kubelet's read-only port, which answers requests without any authentication or authorization. According to the post, a cluster that leaves this port reachable gives an unauthenticated caller a direct view of kubelet status and pod metadata that is normally protected by identity and access controls.
What the port exposes
The setting appears in kubelet configuration as readOnlyPort, and Kubernetes command-line documentation advises setting it to 0 to disable it. The post stresses that this port is not the kubelet's secured HTTPS endpoint, which can enforce client certificates, bearer tokens, anonymous-authentication policy, and authorization through the API server. The read-only port skips all of those checks by design, and its harmless-sounding name makes the exposure easy to underestimate.
In practice, the port discloses pod names, namespaces, container images, node details, and runtime information, the post notes. That is precisely the raw material an attacker needs for reconnaissance, because it reveals the layout of a production environment without requiring a single stolen credential.
Why the setting survives
Kubelet configurations vary by distribution, installer, and cluster age, according to the post. Tutorials sometimes enable the read-only port to simplify a local lab, and legacy configuration files can linger on nodes after a managed platform changes its defaults. Meanwhile, security teams frequently audit the API server's anonymous-access settings while never inspecting the kubelet configuration on the nodes themselves.
The post points to the Kubernetes project's guidance on API server bypass risks, which explicitly recommends making sure the unauthenticated read-only kubelet port is not enabled. That wording matters, the author argues, because the exposure is not confined to the API server's own port: a control-plane hardening review has to cover every node's kubelet configuration and the network path that reaches it.
One subtlety the post highlights is that the setting cannot be inferred from a provider's marketing page or from a single node. Effective configuration should be inventoried per node pool and per image family, with command-line overrides checked alongside the config file. Even if the file sets the value to zero, a leftover command-line flag can turn the port back on, depending on how node bootstrap assembles its arguments.
Checking safely
On nodes you are authorized to inspect, the post suggests looking for a listener on the read-only port; a local process listing is often enough to spot it. Capture the owning process and the node's identity, then compare the result against the intended configuration.
The same Kubernetes guidance, as cited in the post, also recommends verifying that anonymous requests to the secured kubelet endpoint are limited. That means enabling webhook authorization where the cluster design calls for it, keeping anonymous authentication off or tightly constrained, and confirming the node's certificate and token paths reach the intended authenticator.
Network placement is the next control. Kubelet ports should not be reachable from the public internet or from broad user networks; nodes should accept kubelet traffic only from the control plane, monitoring systems, and the specific administrative paths that need it. The post warns that a firewall rule opening an entire corporate range erodes the authentication boundary, since any compromised workstation inside that range effectively becomes a kubelet client. It also cautions against scanning other organizations' nodes and against pasting kubelet responses that contain sensitive workload names, labels, or image references into tickets or chat.
Remediation and verification
The fix, per the post, is to set the read-only port to zero in the maintained kubelet configuration, remove any conflicting command-line override, and restart or reprovision the node through the supported platform method. Verification should confirm the listener is gone from every node, not only the one first tested, and that the secured endpoint still has its intended authenticator and authorizer.
After the change, the post recommends reviewing network policy and host firewall rules: a port that no longer listens is no longer a data path, but the firewall should still deny unapproved access to the node API while keeping monitoring and control-plane traffic working. Finally, add a configuration assertion to the node bootstrap or compliance pipeline that fails when the read-only port is nonzero, when anonymous authentication appears unexpectedly, or when certificate and token authentication paths are missing. Drift alerts should be handled as security events rather than routine availability noise.
Why it matters
The read-only port does not hand over secrets directly, but cluster inventory is the first stage of most real attacks: knowing which images, namespaces, and workloads exist makes later exploitation dramatically cheaper. Because the port bypasses authentication entirely, no credential theft is required to gather that intelligence. The issue is also fundamentally one of drift — tutorials, defaults, and stale flags can quietly reintroduce it — which is why the post frames it as a standing compliance check on every node pool rather than a one-time fix.
- #kubernetes
- #security
- #devops
- #cloud-security
- #kubelet