Kubernetes
What is it?
Kubernetes, also known as K8s, is an open-source system for automating the deployment, scaling, and management of containerized applications. (Orchestration tool)
Features
- High availability
- Scalability (horizontal) and performance
- Disaster recovery
- Self healing
- Automated rollbacks
- Can run on-prem, cloud or hybrid environment
Drawbacks
- High complexity
- Upfront costs are high and can be costly
- High level of expertise and resouces needed to deploy and manage
Architecture

Node
A node may be a virtual or physical machine, depending on the cluster. Each node is managed by the control plane and contains the services necessary to run Pods.The components on a node include the kubelet, a container runtime, and the kube-proxy.
Kubelet
An agent that runs on each node in the cluster. It makes sure that containers are running in a Pod.
Kube-proxy
kube-proxy is a network proxy that runs on each node in your cluster, implementing part of the Kubernetes Service concept.
kube-proxy maintains network rules on nodes. These network rules allow network communication to your Pods from network sessions inside or outside of your cluster.
kube-proxy uses the operating system packet filtering layer if there is one and it’s available. Otherwise, kube-proxy forwards the traffic itself.
Container runtime
A fundamental component that empowers Kubernetes to run containers effectively. It is responsible for managing the execution and lifecycle of containers within the Kubernetes environment.
Pods
Smallest deployable units in kubernetes which has containers.
Control Plane
Responsible for managing a cluster. Also used to setup and monitor nodes and pods.
Kube-apiserver
The API server exposes the Kubernetes API and is the front end for the Kubernetes control plane.
etcd
Consistent and highly-available key value store used as Kubernetes’ backing store for all cluster data. Used by other components to store and access cluster state.
Kube-scheduler
Control plane component that watches for newly created Pods with no assigned node, and selects a node for them to run on.
Factors taken into account for scheduling decisions include: individual and collective resource requirements, hardware/software/policy constraints, affinity and anti-affinity specifications, data locality, inter-workload interference, and deadlines.
kube-controller-manager
It runs controller processes. Logically, each controller is a separate process, but to reduce complexity, they are all compiled into a single binary and run in a single process.
There are many different types of controllers. Some examples of them are:
- Node controller: Responsible for noticing and responding when nodes go down.
- Job controller: Watches for Job objects that represent one-off tasks, then creates Pods to run those tasks to completion.
- EndpointSlice controller: Populates EndpointSlice objects (to provide a link between Services and Pods).
- ServiceAccount controller: Create default ServiceAccounts for new namespaces.
The above is not an exhaustive list.
cloud-controller-manager
It embeds cloud-specific control logic to link your cluster into your cloud provider’s API, and separates out the components that interact with that cloud platform from components that only interact with your cluster.
The cloud-controller-manager only runs controllers that are specific to your cloud provider. If you are running Kubernetes on your own premises, or in a learning environment inside your own PC, the cluster does not have a cloud controller manager.
Tools
kubectl
Run commands against Kubernetes clusters, deploy applications, inspect and manage cluster resources, and view logs.
kubectl get pod -Akubectl create deployment hello-minikube --image=kicbase/echo-server:1.0kubectl expose deployment hello-minikube --type=NodePort --port=8080kubectl get services hello-minikubekubectl delete node <node name>
kind
Run Kubernetes on your local computer.
kind create clusterkind get clusterskubectl cluster-info --context CLUSTER_NAMEkind delete cluster
minikube
Like kind, minikube is a tool to run Kubernetes locally. minikube runs an all-in-one or a multi-node local Kubernetes cluster on your personal computer (including Windows, macOS and Linux PCs) so that you can try out Kubernetes, or for daily development work.
minikube startminikube kubectl -- get po -Aminikube service hello-minikubeminikube dashboardminikube pauseminikube unpauseminikube stopminikube delete --all
kubeadm
To create and manage Kubernetes clusters. It performs the actions necessary to get a minimum viable, secure cluster up and running in a user friendly way.
kubeadm init <args>kubeadm join <control-plane-host>:<control-plane-port> --token <token> --discovery-token-ca-cert-hash sha256:<hash>kubectl drain <node name> --delete-emptydir-data --force --ignore-daemonsetskubeadm reset

