-
-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable Kubelet unauthenticated read-only port #322
Comments
First, the read-only port is not public in the Azure, AWS, GCP, or DigitalOcean firewall configurations. Its limited to traffic between nodes within each cluster. Removing the need for the kubelet read-only port has been a goal to work toward for a while now. Historically, the kubelet read-only port served as a health checking mechanism for load balancers (since the secure port couldn't be used for this) across various distros for as far back as I can recall (dating back to at least Kubernetes v1.2 or earlier). So yes, its been known for years now. With recent improvements acorss clouds, load balancers do TCP health checks of apiservers, instead of requiring HTTP health checks (em Google). So that challenge has been addressed in recent releases:
I've tested disabling the port at various points. Most recently in a branch in May 2018 with v1.10.2. I recall it caused too many breakages to other components at the time (don't have better notes :/). Components still assuming read-only was available. I can revisit it again to see if its safe for inclusion in an upcoming release. |
Correction: Typhoon AWS began using an apiserver TCP health check by v1.9.4. So Typhoon v1.10.2 (April 2018) achieved apiserver load balancing without requiring the read-only port. But the read-only port was still used for Prometheus to scrape Kubelet and cAdvisor metrics and for Heapster to collect metrics (i.e. my attempts in May). Typhoon v1.10.3 added Kubelet bearer token authentiation and switched Prometheus to scrape Kubelet and cAdvisor via the Kubelet authenticated API. Typhoon v1.12.1 still requires the read-only port for Heapster addon (or metrics-server). You'll notice |
* We can finally disable the Kubelet read-only port 10255! * Journey: #322 (comment)
In the next release, the kubelet read-only port is no longer needed. |
@dghubble Obviously I was missing a lot of background on this issue. Thank you for the detailed explanation and the historic overview. It is appreciated. |
* We can finally disable the Kubelet read-only port 10255! * Journey: poseidon/typhoon#322 (comment)
* We can finally disable the Kubelet read-only port 10255! * Journey: poseidon/typhoon#322 (comment)
* We can finally disable the Kubelet read-only port 10255! * Journey: poseidon/typhoon#322 (comment)
* We can finally disable the Kubelet read-only port 10255! * Journey: poseidon/typhoon#322 (comment)
* We can finally disable the Kubelet read-only port 10255! * Journey: poseidon/typhoon#322 (comment)
* We can finally disable the Kubelet read-only port 10255! * Journey: poseidon#322 (comment)
Bug
Not a bug per se but a leakage of possibly sensitive information
Environment
All environments AFAIK.
Problem
While researching another issue I just came across the fact that
kubelet
opens up an unauthenticated HTTP endpoint on port 10255 which can be used to get a dump of all pod manifests (/pods
). I just checked on my Typhoon based cluster and the port is indeed open and reachable from the outside. Was this a conscious decision or is this port even used by something at the moment? If not, I'd like to suggest callingkubelet
with--read-only-port 0
to disable this unauthenticated access to possibly sensitive information. I've disabled this port for onekubelet
of my cluster and haven't seen any ill side effects, yet.Some context:
Desired Behavior
If nothing precludes this I think this port should be closed.
Steps to Reproduce
curl http://$K8S_HOST:10255/pods
The text was updated successfully, but these errors were encountered: