Kubernetes 101 : Key Concepts
The best way to leverage any tool is to understand the fundamentals. This blog covers the following key concepts:
- Nodes: control plane and data plane
- Key components of Kubernetes
- Pods
A Kubernetes cluster consists of multiple nodes. Consider a cluster with five nodes. These nodes are either part of (i) control plane or (ii) data plane. Control plane are essential internal services such as etcd database, API server etc. Data plane consists of nodes which would run your applications.
Every node run key process called kubelet and kube-proxy. Kubelet does serveral things like
- gather information about machine such as Operating System, Architecture, CPU/memory etc
- creates pods on node
Now, consider a scenario where user-a wants to run a web server.
Get Jigar R’s stories in your inbox
Join Medium for free to get updates from this writer.
Traditionally, user would pick a machine, and install a web server like Apache or Nginx directly. In Kubernetes, the web server runs inside a pod, defined via a YAML file.
# YAML file to specify a pod
apiVersion: v1
kind: Pod
metadata:
name: user-a-web-server
spec:
containers:
- name: web-server
image: nginx- The request goes to the API server, which authenticates the user and checks permissions.
- API server records this in the etcd database (key-value store)
- API server has list of controllers who want to get notified whenever some changes occur in database.
In this sense, controllers (such as ReplicaSet controller, Cronjob controller, schedulers, kubelet) are watching for relevant changes to database. Controllers are running event loop. As soon as any relevant event occurs, they check the difference and act accordingly. - Upon notification, Schedulers assign pods to node-A and writes to etcd database via API server. API server informs watchers. In this case, kubelet on node-A would get notified about the change.
- The kubelet on node-A starts web-server container using container-runtime.
Finally, we have a web-server pod running on node-A.
In this blog, I covered basic idea of nodes, pods and 3 components of the Kubernetes control plane. Checkout part-2 to learn more about pods.
References:





