Required Ports for Kubernetes Components
Effective communication among the control plane components and worker nodes relies on specific port configurations. The following table summarizes the key ports that must be open:| Port Range | Component | Description |
|---|---|---|
| 6443 | Kubernetes API Server (master) | Used by worker nodes, the kube-controller-manager, external users, and other control plane components to access the API Server. |
| 10250 | Kubelet (master and worker) | Monitors cluster activities and manages nodes. |
| 10259 | Kube-scheduler (master) | Required for scheduling operations. |
| 10257 | Kube-controller-manager (master) | Needed for managing cluster state and various controllers. |
| 30000–32767 | Worker Nodes Services | Exposes services for external access on worker nodes. |
| 2379 & 2380 | etcd Server (master) | Port 2379 is used for client communication, and port 2380 is used for communication between etcd servers in multi-master deployments. |
For a comprehensive list of required ports and additional configuration details, refer to the Kubernetes Documentation. These details are crucial when configuring firewalls, IP tables, or network security groups across cloud platforms like GCP, Azure, or AWS.
Verifying Network Configuration
To ensure that your cluster’s network environment is set up correctly, it is useful to run several common commands. These commands help you inspect interfaces, IP addresses, hostnames, routing tables, and active services:In upcoming exercises, we will delve into more complex networking scenarios to further enhance your understanding of Kubernetes networking. For now, take your time to review the current configuration and familiarize yourself with the fundamental network requirements of your cluster.