cd ..
KUBERNETES

Understanding Control Plane and Workers

In Kubernetes, the cluster is basically divided into two parts:

Control Plane = Brain of the cluster

Workers = Machines that do the heavy lifting.


Control Plane

The Control Plane decides what happens in the clusters. It doesn’t usually run the application directly, but it manages the entire environment.

Basic Kubernetes Architecture

flowchart LR

    subgraph CP["Control Plane - Node"]
        direction TB

        ETCD[("etcd<br/>Estado do cluster")]
        API["kube-apiserver"]
        SCHED["kube-scheduler"]
        CM["kube-controller-manager"]

        API <--> ETCD
        SCHED <--> API
        CM <--> API
    end

    subgraph W1["Worker Node"]
        direction TB

        KUBELET["kubelet"]
        PROXY["kube-proxy"]
    end

    API <--> KUBELET

etcd

It stores all information. The entire actual state of the cluster. It only communicates with the kube API SERVER.

kube API SERVER

Only it has default permission to communicate with etcd. Its function is to get the status of the cluster as a whole. It’s the one that will communicate with everyone. All cluster communication happens through the kube API SERVER.

kube scheduler

It is responsible for managing where each of the containers will run; it is the controller responsible for placing new containers and knowing the capacity of the nodes.

kube controller manager

It’s the manager of all controllers; it ensures the state of the cluster. It is the cluster’s controller.


Workers

kubelet

It is the Kubernetes agent within the node, and any Kubernetes node will have a kubelet. It’s the one that checks if everything is okay and communicates with the kube APISERVER, receiving the Pod specifications for that node and reporting the state back.

kube proxy

Every node will have a kube proxy. It facilitates communication between pods and the rest of the world, observes cluster resources, and configures network rules on the node.


Ports Used by Kubernetes Components

Ports Used by Kubernetes Components

ComponentDefault PortProtocol
kube-apiserver6443TCP
etcd2379–2380TCP
kube-scheduler10259TCP
kube-controller-manager10257TCP
kubelet10250TCP
kube-proxy10256TCP

Application Exposure Ports

ResourceDefault PortProtocol
Service do tipo NodePort30000–32767TCP ou UDP

References

What did you think?