Every Kubernetes control plane listens on a small set of well-known ports, and any one of them reachable from the wrong network turns a configuration slip into a path to the whole cluster. This reference lists the control plane and node ports from the Kubernetes documentation, explains what each one exposes and which settings decide whether an unauthenticated caller gets anywhere, and shows how to check from your own inventory that none is open where it should not be. It is written for platform engineers running self-managed clusters, with notes on how managed services such as Amazon EKS, Azure Kubernetes Service and Google Kubernetes Engine change the picture. Overall cluster hardening (RBAC, admission control, Secrets encryption) is covered in the Kubernetes Security Guide; this page stays on ports and the settings behind them.
Key takeaways
- Five control plane ports matter. The Kubernetes documentation lists TCP 6443 (API server), 2379-2380 (etcd), 10250 (kubelet), 10257 (kube-controller-manager) and 10259 (kube-scheduler); only the API server is meant to be reached by clients outside the control plane.
- etcd is the crown jewel. The Kubernetes documentation states that write access to etcd is equivalent to gaining root on the entire cluster, so 2379-2380 should accept only TLS client certificates from the API servers and sit behind a firewall that admits nothing else.
- Upstream defaults are permissive. The kubelet ships with
--anonymous-authdefaulting to true and--authorization-modedefaulting toAlwaysAllow; the scheduler and controller manager default--bind-addressto 0.0.0.0. Installers often change these, so verify the running configuration rather than assume. - Custom ports move the risk, not remove it. All default port numbers can be overridden, and the API server is often moved to 443 or put behind a load balancer, so your inventory must record the ports actually in use.
- Managed services own most of this, not all. On EKS, AKS and GKE the provider runs etcd, the scheduler and the controller manager, but the API server endpoint is public by default on EKS and AKS, and node kubelets remain yours to configure and firewall.
Port table
The table combines the control plane and worker node tables from the Kubernetes Ports and Protocols reference with the binding and authentication settings that decide exposure. Defaults are the upstream component defaults from the Kubernetes command-line reference; your installer may set different values.
| Port (TCP) | Component | Used by (per Kubernetes docs) | Settings that decide exposure | Should be reachable from |
|---|---|---|---|---|
| 6443 | kube-apiserver | All | --secure-port (default 6443, cannot be set to 0), --bind-address, --anonymous-auth (default true), authorisation modes | Nodes, administrators, CI/CD and approved networks only |
| 2379 | etcd client API | kube-apiserver, etcd | --client-cert-auth, --trusted-ca-file, --listen-client-urls | API servers only |
| 2380 | etcd peer API | kube-apiserver, etcd | --peer-client-cert-auth, --peer-trusted-ca-file, --listen-peer-urls | Other etcd members only |
| 10250 | kubelet API (control plane and workers) | Self, control plane | --anonymous-auth (default true), --authorization-mode (default AlwaysAllow), --authentication-token-webhook, client CA | API servers and local monitoring agents only |
| 10255 | kubelet read-only port (legacy) | Not listed in the ports table | --read-only-port; the kubelet reference describes it as serving with no authentication or authorisation and says set to 0 to disable | Nothing: set to 0 |
| 10257 | kube-controller-manager | Self | --secure-port (default 10257), --bind-address (default 0.0.0.0), --profiling (default true) | Localhost and the control plane's own health checks |
| 10259 | kube-scheduler | Self | --secure-port (default 10259), --bind-address (default 0.0.0.0), --profiling (default true) | Localhost and the control plane's own health checks |
| 10256 | kube-proxy (health) | Self, load balancers | kube-proxy health and metrics bind addresses | Node and load balancer health checks |
| 30000-32767 (TCP and UDP) | NodePort Services | All | --service-node-port-range on the API server; Service type | Only where a NodePort Service is intended to be public |
The Ports and Protocols page notes that etcd can be hosted externally or on custom ports, and that a common variant moves the API server to 443, or keeps 6443 and places a load balancer listening on 443 in front of it. Record both the listener and the backend port in your inventory.
API server 6443
The API server is the only control plane component designed to be reached by people and systems outside the control plane hosts. The question is not whether 6443 is open but to whom, and what an unauthenticated request can do once it arrives.
- Transport: the Controlling Access page states that the API server listens on port 6443 by default and that the port is changed with
--secure-port. The kube-apiserver reference says the secure port cannot be switched off with 0, so there is always a TLS listener to protect. - Anonymous requests: the Authentication reference explains that anonymous access is enabled by default when an authorisation mode other than
AlwaysAllowis used, and that requests not rejected by another authenticator receive the usernamesystem:anonymousand groupsystem:unauthenticated. You can disable it with--anonymous-auth=false, or, where theAnonymousAuthConfigurableEndpointsfeature is available in your version, use theanonymousblock of anAuthenticationConfigurationfile to allow anonymous access only to named health endpoints such as/livezand/readyz. You cannot use both the flag and the file setting. - RBAC for the unauthenticated group: audit every ClusterRoleBinding and RoleBinding whose subjects include
system:anonymousorsystem:unauthenticated. A single binding added for a quick test is enough to expose cluster data to anyone who can reach 6443. See How to audit Kubernetes cluster admin bindings. - Network scope: put the API server on an internal address and publish it through a load balancer or private endpoint with an allow list of administrator, CI/CD and node networks. Credentials leak, so a network allow list is a second gate, not a substitute for authentication.
Managed services
Platforms are listed alphabetically. Each provider runs the control plane components for you; the API server endpoint settings are yours.
- Amazon EKS: the EKS User Guide states that by default the API server endpoint is public to the internet, secured by AWS IAM and Kubernetes RBAC. You can restrict the public endpoint to a list of public access CIDRs, enable the private endpoint so node traffic stays in the VPC, or disable public access entirely and control the private endpoint with the cluster security group. See the Amazon EKS Security Hardening Guide.
- Azure Kubernetes Service: Microsoft Learn states that each AKS cluster's API server gets a public IP address by default and that authorized IP ranges restrict which addresses can reach it, with up to 200 ranges (API Server VNet Integration supports more). Authorized IP ranges cannot be combined with private clusters, which are the alternative for keeping the API server off the internet. See the Azure Kubernetes Service Security Hardening Guide.
- Google Kubernetes Engine: Google Cloud documentation recommends the DNS-based control plane endpoint, governed by IAM, with VPC Service Controls available for network-based limits. If you use IP-based endpoints, Google strongly recommends adding at least one authorized network (up to 100 IPv4 ranges), and the most restrictive option exposes the control plane on the internal endpoint only. See the GKE Security Hardening Guide.
etcd 2379-2380
etcd holds every object in the cluster, including Secrets unless encryption at rest is configured. The Kubernetes Securing a Cluster page states that write access to the etcd backend is equivalent to gaining root on the entire cluster and that read access can be used to escalate fairly quickly. It recommends strong credentials from the API servers to etcd, such as mutual TLS client certificates, and isolating etcd behind a firewall that only the API servers may cross.
| Control | etcd setting | What it achieves |
|---|---|---|
| Encrypt client traffic | --cert-file, --key-file, HTTPS in --listen-client-urls and --advertise-client-urls | TLS on port 2379 |
| Require client certificates | --client-cert-auth=true with --trusted-ca-file | Only clients holding a certificate signed by the etcd CA can connect; the Kubernetes etcd page uses this to restrict access to the API servers |
| Encrypt and authenticate peers | --peer-cert-file, --peer-key-file, --peer-client-cert-auth, --peer-trusted-ca-file, HTTPS peer URLs | Members on 2380 accept only other members |
| Dedicated CA | Separate CA for etcd, not the cluster CA | A certificate issued for another cluster purpose cannot be replayed against etcd |
| Network isolation | Host firewall or security group admitting 2379 from API server addresses and 2380 from member addresses only | Defence in depth if a certificate or key leaks |
| Encryption at rest | API server EncryptionConfiguration | Copies of etcd data and backups do not expose Secrets in plain form |
- Do not share etcd: the Securing a Cluster page warns that allowing other cluster components to use the main etcd instance invites risk, and suggests separate etcd instances or etcd access control lists for anything else.
- Backups are etcd too: the Kubernetes etcd page asks for a backup plan; a snapshot file holds the same data as the live cluster, so store snapshots encrypted with access limited to the recovery role. See How to check Kubernetes secrets encryption at rest.
- Certificates are identities: the API server's etcd client certificate and key are non-human credentials with cluster-wide power. Track their location, expiry and rotation like any other machine credential. See the Kubernetes NHI Security Guide.
Controller manager and scheduler
Ports 10257 (kube-controller-manager) and 10259 (kube-scheduler) serve HTTPS with authentication and authorisation, mainly for health checks, metrics and, where enabled, profiling. The Ports and Protocols page lists both as used by "Self", meaning nothing outside the host needs them.
- Binding: the upstream command-line references give a default
--bind-addressof 0.0.0.0 for both, which listens on all interfaces. Set it to127.0.0.1where your health checks run locally, and check what your installer actually writes into the static pod manifests or service units. - Paths that skip authorisation: both components default
--authorization-always-allow-pathsto/healthz,/readyz,/livez. Keep that list short and do not add metrics or debug paths to it. - Profiling:
--profilingdefaults to true on both and exposes/debug/pprof/. Set it to false in production unless you have a specific, time-boxed need.
On managed services these components run inside the provider's control plane and their ports are not reachable from your network, so the checks above apply to self-managed clusters.
Kubelet ports
Port 10250 runs on every node, control plane and worker alike, and grants powerful control over the node and its containers. The Securing a Cluster page states that kubelets allow unauthenticated access to this API by default and that production clusters should enable kubelet authentication and authorisation. Discovery and remediation steps for exposed kubelets are in How to find exposed Kubernetes API servers, dashboards and kubelets; the settings themselves are summarised here.
| Setting (flag or KubeletConfiguration field) | Upstream default | Hardened value |
|---|---|---|
--anonymous-auth / authentication.anonymous.enabled | true | false, so unauthenticated requests receive 401 Unauthorized |
--authentication-token-webhook / authentication.webhook.enabled | Off unless set | Enabled, so bearer tokens are checked through the TokenReview API |
--client-ca-file / authentication.x509.clientCAFile | Unset | Set to the CA that signs API server client certificates |
--authorization-mode / authorization.mode | AlwaysAllow | Webhook, so requests are authorised through SubjectAccessReview |
--read-only-port / readOnlyPort | 10255 in the flag reference | 0 (disabled) |
- Use the config file: the kubelet reference marks these flags as deprecated in favour of the file passed with
--config. Check the file, the flags and any drop-in overrides, because a flag on one node pool can silently undo a file setting. - Verify the other direction: the control plane to node communication page states that by default the API server does not verify the kubelet's serving certificate, which makes the connection unsafe over untrusted networks. Set
--kubelet-certificate-authorityon the API server. - Watch
nodes/proxy: the kubelet authorisation page warns thatgetonnodes/proxyis not a read-only permission. A monitoring role with that grant can reach the kubelet through the API server even when 10250 is firewalled.
Checking exposure
Work from your own inventory and configuration, on clusters you own or are authorised to assess. The aim is to prove each port is reachable only from the sources listed in the port table.
- Build the expected list: for every cluster record the API server endpoint (DNS name, addresses, listener and backend ports), the etcd member addresses and ports, node pools and their subnets, and any NodePort or LoadBalancer Services meant to be public.
- Read the network rules: export security groups, network security groups, firewall rules and load balancer listeners for those addresses. Flag any rule admitting 0.0.0.0/0 or ::/0 to 2379, 2380, 10250, 10255, 10257 or 10259, and any public rule on 6443 or 443 that is not an approved allow list.
- Read the component configuration: on each control plane host, inspect the static pod manifests or unit files for
--bind-address,--anonymous-auth,--profiling,--client-cert-authand--peer-client-cert-auth. On each node pool, inspect the kubelet configuration file for the fields in the kubelet table. - Check from the host: list listening sockets on a control plane host and confirm 10257 and 10259 are on 127.0.0.1 and etcd listens only on the intended interfaces.
- Test from approved vantage points: from an administrator network, a node subnet and an external address you control, confirm the expected result for each port (connection refused or filtered, or TLS with a 401 for unauthenticated requests).
- Check external views of your own assets: review your attack surface management or exposure monitoring results for your registered address ranges and DNS names, and treat any finding on a control plane port as a priority incident.
- Keep it fixed: encode the rules as policy in infrastructure as code (no public CIDR on the control plane ports), alert on drift, and re-run the checks after every upgrade or node pool change. Run the CIS Kubernetes Benchmark checks for your distribution as a periodic second opinion.
Detection and measurement
- Logs to collect: API server audit events for requests by
system:anonymous, flow logs for traffic to 2379-2380 from any source other than API servers, and kubelet requests that fail authentication. - Metric: exposed control plane ports: count of cluster endpoints with a control plane port reachable from the internet; target zero.
- Metric: kubelet hardening coverage: percentage of node pools with anonymous auth off, Webhook authorisation and read-only port 0; target 100 percent.
- Metric: anonymous bindings: number of RoleBindings and ClusterRoleBindings naming
system:anonymousorsystem:unauthenticatedbeyond the defaults you have reviewed.
Framework mapping
| Framework | Reference | How it applies to control plane ports |
|---|---|---|
| NIST CSF 2.0 | PR.IR-01 | Networks and environments protected from unauthorised logical access: control plane allow lists |
| NIST CSF 2.0 | PR.PS-01 | Configuration management: bind addresses, anonymous auth, profiling |
| NIST CSF 2.0 | PR.AA-03 | Services and hardware authenticated: etcd and kubelet client certificates |
| NIST SP 800-53 Rev 5 | SC-7, CM-7, CM-6, AC-3 | Boundary protection, least functionality (disable read-only port and profiling), configuration settings, access enforcement |
| MITRE ATT&CK | T1552.007 Container API | Credential access through exposed container and kubelet APIs |
| MITRE ATT&CK | T1609 Container Administration Command, T1610 Deploy Container | Execution through an exposed kubelet or API server |
| MITRE ATT&CK | T1613 Container and Resource Discovery | Enumeration through anonymous API or kubelet access |
Common failure patterns
- Trusting the installer: teams assume their distribution hardened the kubelet and bind addresses, then add a node pool from an older template that does not.
- etcd on the node network: etcd members listen on all interfaces with no client certificate requirement because "only the API server knows the address".
- Allow list of 0.0.0.0/0: a managed cluster's public endpoint left at the default during a proof of concept becomes production.
Practitioner checklist
- Record every control plane endpoint and the ports actually in use, including custom ports and load balancer listeners.
- Confirm no rule admits internet sources to 2379, 2380, 10250, 10255, 10257 or 10259.
- Restrict 6443 (or its 443 front end) to approved networks, using private endpoints, authorized IP ranges or authorized networks on managed services.
- Enforce
--client-cert-authand--peer-client-cert-authon etcd with a dedicated CA, and firewall it to API servers and members. - Set kubelet anonymous auth off, authorisation mode Webhook and read-only port 0 on every node pool.
- Bind the scheduler and controller manager to 127.0.0.1 and turn profiling off.
- Disable or restrict anonymous API server access and review bindings to
system:anonymousandsystem:unauthenticated. - Set
--kubelet-certificate-authorityon the API server. - Alert on drift and re-test after every upgrade.
Standards and references
- Kubernetes: Ports and Protocols
- Kubernetes: Securing a Cluster
- Kubernetes: Kubelet authentication/authorization
- Kubernetes: Operating etcd clusters for Kubernetes
- Kubernetes: Communication between Nodes and the Control Plane
- Kubernetes: Authenticating
- AWS: Control network access to cluster API server endpoint
- Microsoft Learn: Secure access to the API server using authorized IP address ranges in AKS
Related NHI Mgmt Group resources: Kubernetes Security Guide · Top 10 Kubernetes Security Risks · How to find exposed Kubernetes API servers, dashboards and kubelets · Kubernetes NHI Security Guide