|
| 1 | +--- |
| 2 | +title: Ports and Protocols |
| 3 | +content_type: reference |
| 4 | +weight: 50 |
| 5 | +--- |
| 6 | + |
| 7 | +When running Kubernetes in an environment with strict network boundaries, such |
| 8 | +as on-premises datacenter with physical network firewalls or Virtual |
| 9 | +Networks in Public Cloud, it is useful to be aware of the ports and protocols |
| 10 | +used by Kubernetes components |
| 11 | + |
| 12 | +## Control plane |
| 13 | + |
| 14 | +| Protocol | Direction | Port Range | Purpose | Used By | |
| 15 | +|----------|-----------|------------|-------------------------|---------------------------| |
| 16 | +| TCP | Inbound | 6443 | Kubernetes API server | All | |
| 17 | +| TCP | Inbound | 2379-2380 | etcd server client API | kube-apiserver, etcd | |
| 18 | +| TCP | Inbound | 10250 | Kubelet API | Self, Control plane | |
| 19 | +| TCP | Inbound | 10259 | kube-scheduler | Self | |
| 20 | +| TCP | Inbound | 10257 | kube-controller-manager | Self | |
| 21 | + |
| 22 | +Although etcd ports are included in control plane section, you can also host your own |
| 23 | +etcd cluster externally or on custom ports. |
| 24 | + |
| 25 | +## Worker node(s) {#node} |
| 26 | + |
| 27 | +| Protocol | Direction | Port Range | Purpose | Used By | |
| 28 | +|----------|-----------|-------------|-----------------------|-------------------------| |
| 29 | +| TCP | Inbound | 10250 | Kubelet API | Self, Control plane | |
| 30 | +| TCP | Inbound | 30000-32767 | NodePort Services† | All | |
| 31 | + |
| 32 | +† Default port range for [NodePort Services](/docs/concepts/services-networking/service/). |
| 33 | + |
| 34 | +All default port numbers can be overridden. When custom ports are used those |
| 35 | +ports need to be open instead of defaults mentioned here. |
| 36 | + |
| 37 | +One common example is API server port that is sometimes switched |
| 38 | +to 443. Alternatively, the default port is kept as is and API server is put |
| 39 | +behind a load balancer that listens on 443 and routes the requests to API server |
| 40 | +on the default port. |
0 commit comments