LLI Wiki — My Digital Knowledge Base

Kubernetes: manifest, service and node architecture

Introductory Kubernetes memo: deployment, service, cluster IP, master node, worker nodes and basic kubectl commands.

An introductory Kubernetes memo: how a manifest describes an application, how a service exposes pods, and which components run on the master node and on the worker nodes.

Principle: manifest, deployment and service

With kubectl, you send a manifest to the Kubernetes API. The manifest describes the desired state:

A service has a cluster IP (an address internal to the cluster) that load-balances traffic across the pods. To be reachable from outside, it is exposed through an external IP.

The "service per container" principle is described on microservices.io.

Hand-drawn diagram: manifest, kubectl, API, pods, external IP and cluster IP

Architecture: master node and worker nodes

The next diagram shows two worker nodes: the first runs a pod with an nginx container, the second a pod with a PostgreSQL container. The manifest is applied with kubectl through the API server.

Kubernetes architecture: master node and worker node

Diagram of a master node and two worker nodes running nginx and postgres

Checking the state with kubectl

kubectl get pods -n <namespace>
kubectl get deployments -n <namespace>

get pods lists the pods of the namespace with their status (Running, ContainerCreating...), the number of ready containers and their age. get deployments shows, per deployment, the number of ready, up-to-date and available replicas.

Output of kubectl get pods and kubectl get deployments

Mastodon LLIMastodon SocialFosstodon