Lesson 1.7: Static Pod manifests


The files located in the /etc/kubernetes/manifests directory on a Kubernetes control plane node are static Pod manifests. These files are responsible for defining and managing the core control plane components of the Kubernetes cluster. When the kubelet (the primary node agent) runs on the control plane node, it monitors this directory and ensures that the Pods defined in these manifests are running.

[root@master practice-2]# docker ps 
CONTAINER ID   IMAGE                  COMMAND                  CREATED       STATUS       PORTS                                                 NAMES
19b1ca6bed9a   kindest/node:v1.32.2   "/usr/local/bin/entr…"   4 days ago    Up 7 hours   127.0.0.1:46411->6443/tcp                             cka-cluster1-control-plane
94c452694048   kindest/node:v1.32.2   "/usr/local/bin/entr…"   10 days ago   Up 7 hours                                                         dev-worker2
679760d6ae3f   kindest/node:v1.32.2   "/usr/local/bin/entr…"   10 days ago   Up 7 hours   0.0.0.0:30001->30001/tcp, 127.0.0.1:45421->6443/tcp   dev-control-plane
129d3fba1c07   kindest/node:v1.32.2   "/usr/local/bin/entr…"   10 days ago   Up 7 hours                                                         dev-worker
 
[root@master practice-2]# docker exec -it dev-control-plane bash 
root@dev-control-plane:/# cd /etc/kubernetes/manifests/
root@dev-control-plane:/etc/kubernetes/manifests# ls
etcd.yaml  kube-apiserver.yaml	kube-controller-manager.yaml  kube-scheduler.yaml
root@dev-control-plane:/etc/kubernetes/manifests# vim kube-controller-manager.yaml 

Here’s a breakdown of what each file is responsible for:

  • etcd.yaml
    • Purpose: Defines the etcd Pod, which is the distributed key-value store used by Kubernetes to store all cluster data (e.g., cluster state, configuration, and metadata).
    • Role: etcd is the backbone of the Kubernetes cluster, ensuring consistency and reliability of the cluster's data.
    • Key Components:
      • etcd container: Runs the etcd server.
      • Command-line arguments: Configure etcd to listen on specific ports, use TLS for secure communication, and point to the data directory.
  • kube-apiserver.yaml
    • Purpose: Defines the kube-apiserver Pod, which is the front-end for the Kubernetes control plane. It exposes the Kubernetes API and validates and processes all API requests.
    • Role: The kube-apiserver is the central management entity for the cluster, handling communication between all components (e.g., kubelet, kube-controller-manager, kube-scheduler, and user requests via kubectl).
    • Key Components:
      • kube-apiserver container: Runs the API server.
      • Command-line arguments: Configure authentication, authorization, admission control, and connection to etcd.
  • kube-controller-manager.yaml
    • Purpose: Defines the kube-controller-manager Pod, which runs the core control loops that regulate the state of the cluster.
    • Role: The kube-controller-manager ensures that the desired state of the cluster (e.g., number of replicas for a Deployment) matches the actual state.
    • Key Components:
      • kube-controller-manager container: Runs the controller manager.
      • Command-line arguments: Configure controllers (e.g., node controller, replication controller, endpoints controller) and connection to the kube-apiserver.
  • kube-scheduler.yaml
    • Purpose: Defines the kube-scheduler Pod, which is responsible for scheduling Pods onto nodes in the cluster.
    • Role: The kube-scheduler evaluates resource requirements, node capacity, and other constraints to assign Pods to the most suitable nodes.
    • Key Components:
      • kube-scheduler container: Runs the scheduler.
      • Command-line arguments: Configure scheduling policies and connection to the kube-apiserver.
All systems normal

© 2025 2023 Sanjeeb KC. All rights reserved.