The 9 Vanilla Kubernetes Components
Understanding the Basic Kubernetes Components
The 9 Kubernets Vanilla components are: Kubernetes Scheduler, Kubernetes Controller, Kubernetes API Server, Kubernetes etcd, Kubelet, Kube-Proxy, Ingress, Kubectl and Kubeadm.
Kubernetes Scheduler aka. “Node Assigner”
In Kubernetes, scheduling refers to making sure that Pods are matched to Nodes so that the kubelet can run them. Preemption is the process of terminating Pods with lower Priority so that Pods with higher Priority can schedule on Nodes. Eviction is the process of terminating one or more Pods on Nodes.
The Kubernetes scheduler is a component that assigns pods to nodes based on various factors, such as resource availability, node affinity, pod priority, and so on. The scheduler monitors the API server for unassigned pods and selects the best node for each pod.
Kubernetes Controller aka. “Equilibirium Maintainer”
In Kubernetes, controllers are control loops that watch the state of your cluster, then make or request changes where needed. Each controller tries to move the current cluster state closer to the desired state.
The Kubernetes controller is a generic term for a set of components that run control loops to watch the state of the cluster and make changes to move it towards the desired state. There are different types of controllers, such as replication controller, deployment controller, daemonset controller, endpoint controller, and so on. Each controller has a specific function and operates on a specific kind of resource.
The controller makes changes by sending requests to the API server, which then updates the cluster state and triggers the necessary actions. The scheduler is a specific type of controller that assigns pods to nodes, but there are other controllers that perform different functions, such as scaling, rolling updates, service discovery, and so on.
You can think of the controller as a loop that constantly compares the desired state and the current state of the cluster, and tries to reconcile them by making changes. For example, if you create a deployment with 3 replicas, the controller will create 3 pods and assign them to nodes. If one of the pods fails, the controller will detect that and create a new pod to replace it.
The controller pattern is a common way of implementing control loops in Kubernetes. You can also write your own custom controllers to extend the functionality of Kubernetes and manage your own resources.
Kubernetes API Server aka. “Single Point of Communication”
The Kubernetes API server is the central component of the control plane that exposes the Kubernetes API. It validates and configures the data for pods, services, replication controllers, and other objects. It also provides access to the cluster state and allows users to interact with the cluster.
Kubernetes etcd aka. “Single Source of Truth”
Etcd is a distributed key-value store that serves as the backing store for all cluster data. It is used by the Kubernetes API server to store and retrieve data about the cluster state. Etcd is designed to be consistent, reliable, and secure.
Kubelet aka. “Pods to VM Glue”
Kubelet is an agent that runs on each node in the cluster and communicates with the API server. It ensures that the containers are running in the pods as expected. It also manages the pod lifecycle, such as creating, starting, stopping, and deleting pods. Kubelet is responsible for registering the node with the cluster, reporting the node status, and applying the node-level resource management.
Kube-Proxy aka. “Pods Talking Glue”
Kube-proxy is a network proxy that runs on each node in the cluster. It maintains network rules on the nodes and allows network communication between your pods across the cluster. Kube-proxy can operate in different modes, such as iptables, ipvs, or userspace.
Ingress aka. “Portal to the Outside World”
Ingress controller is a controller that provides an external access point to services in a cluster. It typically uses a load balancer or an edge router to route traffic from outside the cluster to the appropriate services inside the cluster. There are different implementations of ingress controllers, such as NGINX, Traefik, Istio, and more.
Kubectl aka. “Kubernetes CLI”
Kubectl is a command-line tool that allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs. Kubectl is the primary way of interacting with Kubernetes from your terminal.
Kubeadm aka. “Kubernetes Installation Helper”
Kubeadm is a tool that helps you bootstrap a minimum viable Kubernetes cluster that conforms to best practices. Kubeadm automates the installation and configuration of the control plane components, such as the API server, scheduler, controller, etcd, and kubelet. Kubeadm also joins nodes to the cluster and sets up the pod network.