Home / Knowledge hub / Kubelet API exposure
Knowledge hub
Kubelet API exposure
An open node-level Kubernetes API that can run commands in pods.
What it means
The kubelet is the agent that runs on every Kubernetes node and starts the containers on it. It has its own HTTPS API, normally on port 10250, that lists pods, reads logs and can run commands inside containers. Kubelet API exposure means that API can be reached by people who should not reach it.
The risk lies in the checks. If the kubelet accepts anonymous requests or allows every request that arrives, anyone with network access to the node can ask it to open a shell in a pod. That is node-level control, reached without touching your application at all.
Why it matters
A reachable, unprotected kubelet is a direct route to run code in your workloads, read their environment variables and steal the service account tokens mounted inside them. From there, an attacker can try to reach the control plane and other namespaces.
Clusters with this problem tend to have it for a long time, because nothing breaks. The flaw only shows when somebody scans for it. For a customer-data business, one open port on a node can turn a small cloud mistake into a data breach.
How it shows up
Check the kubelet configuration. Anonymous authentication should be off, and authorisation should be set to Webhook so the API server decides, rather than allowing everything. Block port 10250 from the internet and from networks that have no need of it. Managed Kubernetes services set most of this for you, but custom node images can differ.
The usual causes are a hand-built cluster, an old tutorial configuration, and security groups opened wide during a debugging session and never closed. Include the nodes in your port scans and confirm that the answer to an unauthenticated request is a refusal.
Questions people ask
Kubelet API exposure, answered
What port does the kubelet API use?
The main kubelet API listens on port 10250 over HTTPS. An older read-only port, 10255, is off by default in current versions.
Neither should be reachable from the internet. Check both on your own nodes.
Can someone run commands in my pods through the kubelet?
Yes, if authentication and authorisation are not enforced. The kubelet exposes endpoints for running commands and attaching to containers.
With proper checks, those requests are refused unless the caller has the right permissions.
Is this a problem on managed Kubernetes services?
Much less so. Providers configure kubelet authentication on their node images and keep the nodes off the public internet by default.
Check if you use custom node images or self-managed nodes, where the setting is yours.
How do I check whether my kubelet is exposed?
From a machine outside the cluster, try to reach port 10250 on a node address and see whether it answers. Then review the kubelet's authentication and authorisation settings.
Cloud security group rules show which networks are allowed in.
Is a network firewall enough?
It is a strong first layer and should be there. It should not be the only one, because a single wrong rule removes it.
Turn off anonymous access in the kubelet as well, so a mistake in one place does not expose everything.
Sources
Where this comes from
Related
Terms that sit next to this one
Exposed Kubernetes dashboard
A cluster admin screen reachable without proper sign-in.
etcd exposure
An open Kubernetes data store, which holds the cluster's secrets and state.
Kubernetes RBAC
Rules for which accounts and services may do what inside a Kubernetes cluster.
Kubernetes network policy
Rules that say which pods may talk to which other pods.
Cluster hardening
Tightening a Kubernetes setup against published good-practice benchmarks.
Who can reach the node?
Cyberlop tests web applications and their APIs, so it sits above the cluster. It finds and proves the flaws in your app that give an intruder a first foothold. Ask us to run it on one of your applications.
Or start with a $199 pilot on one application: thirty days, success criteria agreed before day one, credited against the annual if you convert.