Kubernets Architecture
Master Node/Control Plane
-
User Interacts with Master node(using yaml file). Master node create/destroy worker nodes.
Daemon in master node
Name | Description |
---|---|
1. API Server | Manages all communication with Worker nodes(using kubelet) |
1. etcd |
Stores state of kubernets cluster |
3. Scheduler | Schedules pods to run on worker nodes |
4. Controller Manager | Runs controllers that monitors state of cluster and maintains desired state |
5. Add-ons | Provides additional functionality |
Worker Node
-
Handles workload. Worker nodes hosts PODS. 1 Pod can contain 1 or more containers, Eg: docker.
Deamons in Worker Node
Name | Description |
---|---|
1. Kubelets | Recieves instructions from master node to run/manage container. |
2. Container Runtime | This actually runs the container. Several runtimes kubernets supports: Docker, containerd, CRI-O |
3. Kube-proxy | For communication with other nodes in cluster |
4. Add-Ons | Additional functionality. |
5. Node status & Meta-data | Each worker node maintains meta-data about itself. Example: IP Address, hostname, Current status (Ready, Not Ready, Out of Disk space etc) |
POD
-
POD is smallest deployable unit in kubernets. 1 Pod can contain 1 or more containers
Each POD has its own: IP & namespace. Containers in POD share resources and can communicate using 'localhost' and can share storage volumes. Memory is allocated to Pods using Volumes.
Can Container has multiple executables running?
Yes, But its not recommended. Container should ideally run only 1 process.
Terms
Term | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
Namespace |
Divides cluster into smaller units to isolate services, volumes and manage.
Namespace contains pods. 3 predefined namespaces: Default, Kube-system(resources created by kubernets), Kube-public(reserved for future) |
||||||||
Service (kubernets Networking objects) |
Service is Networking abstraction which provides stable network access to pods. service does not run inside containers, these are k8s objects. Each service routes the traffic to 1 or more POD Service provides: Load balancing, service discovery, stable endpoints |
||||||||
PVC(Persistant Volume Claims) |
Types of PVC
1. Config PVC: |