Welcome to Kenny-s Blog

Kubernetes

Kubernetes architecture

With Kubernetes, containers run in Pods, which are the basic scheduling unit for Kubernetes, and which add a layer of abstraction to containers. Pods are comprised of one or multiple containers located on a host machine, and they can share resources. Kubernetes finds a machine that has enough free compute capacity for a given Pod and launches the associated containers. To avoid conflicts, each Pod is assigned a unique IP address, enabling applications to use ports.

A node agent, called a kubelet, manages the Pods, their containers and their images. Kubelets also automatically restart a container if it fails. Alternatively, Kubernetes APIs can be used to manually manage Pods.

Kubernetes controllers manage clusters of Pods using a reconciliation loop to push for a desired cluster state. The Replication Controller ensures that the requested number of Pods run to the Kubernetes user’s specifications. It can be used to create new Pods if a node fails, or to manage, replicate and scale up existing Pods.

The Replication Controller scales containers horizontally in Kubernetes. It ensures there are more or fewer containers available as the overall application’s computing needs fluctuate. In other cases, a job controller can manage batch work, or a DaemonSet controller may be implemented to manage a single Pod on each machine in a set.

The Master node runs the Kubernetes API and controls the cluster. It serves as part of the control plane, managing communications and workloads across clusters.

A node, also known as a minion, is a worker machine in Kubernetes. It can be either a physical machine or a virtual machine. Nodes have the necessary services to run Pods and receive management instructions from master components. Services found on nodes include Docker, kube-proxy and kubelet.

Other important Kubernetes components to know include labels, which are key/value pairs used for service discovery; and Service, which is an automatically configured load balancer and integrator that runs across the cluster. A label tags the containers and links them together into groups.

Have something to add? Share it in the comments.

Your email address will not be published. Required fields are marked *