Nodes and Pods

What are nodes and pods in Kubernetes?

In Kubernetes, every deployment leads to the creation of a cluster. A cluster comprises a set of working machines called nodes responsible for running containerized applications. These nodes host the pods containing components of an application’s workload. 

What is a Kubernetes Pod?

When developers create deployments in Kubernetes, it establishes a pod to host the application instance. A pod is an abstraction in Kubernetes that manages a group of application containers and any shared resources those containerized applications require. Shared resources can include storage, networking, IP addresses, and the metadata needed to run the container, such as container image versioning and port information. 

Pods behave similarly to an application-specific logical host architecture, hosting containers with tightly coupled functionality. All containers in a pod share the same IP address and port information, and typically, containers that need to communicate directly for their core functions will reside in the same pod. 

One difference with Kubernetes relative to other implementation methods is that deployments create pods with containers inside them rather than creating containers directly. Each pod is tied to a node, with failover to other identical pods on different nodes. 

What is a Kubernetes Node?

Nodes are the workhorses of Kubernetes and can exist as either virtual or physical machines, depending on the cluster configuration. The primary function of a Kubernetes node is that pods always run on nodes. The control plane manages the nodes, and each node can have multiple pods. The control plane is essential because it features automatic scheduling that distributes resources to the pods across each node. 

At a minimum, every Kubernetes node runs a Kubelet and a container runtime environment. The Kubelet is responsible for handling communications between the Kubernetes master (control plane) and the node and the pods and containers running on each machine. The container runtime environment takes pulling container images from the container registry, unpacks the container, and runs the application. 

Another element of the node is the Kube-proxy. The Kube-proxy is a network proxy service that runs on each node within a cluster and manages the network rules that apply across the node. This provides a critical service because the network rules facilitate pod communications within and outside the cluster. It either forwards traffic directly or leverages the operating system’s packet filtering layer. 

Nodes and Pods in Kubernetes

Along with the control plane, nodes and pods form the components of a Kubernetes cluster. Worker nodes host pods, which form the basis of workloads for containerized applications in Kubernetes. 

Stay up to date