Day 13/40 - Static Pods, Manual Scheduling, Labels, and Selectors in Kubernetes
About this video
### Summary of the Video Content: 1. **Introduction and Context**: - The video is part of the CK 2024 series, specifically video number 13. - The presenter, Piyush, covers topics like note selectors, labels, selectors, static pods, and manual scheduling. - Viewers are encouraged to watch previous videos or ensure they understand prior concepts before proceeding. 2. **Kubernetes Architecture Recap**: - Kubernetes architecture includes a control plane and worker nodes. - The scheduler is a critical component that decides which pod runs on which node. - When a new pod is created via `kubectl`, the API server logs it in the etcd database, and the scheduler determines the appropriate node for the pod based on algorithms and factors. 3. **Scheduler Workflow**: - The scheduler monitors all pods, especially those not yet running, and sends scheduling requests to the kubelet on the target node. - Once the pod is provisioned, the kubelet updates the API server, which then informs the client (e.g., `kubectl`). 4. **Static Pods**: - Static pods are control plane components (e.g., API server, scheduler) that are not managed by the scheduler itself. - These pods are managed directly by the kubelet, which monitors a specific directory (e.g., `/etc/kubernetes/manifests`) for pod manifests. - If the manifest file for a static pod (e.g., scheduler) is removed, the corresponding pod stops running, disrupting its functionality. 5. **Demonstration of Static Pods**: - The presenter demonstrates how static pods work in a Kind cluster, where nodes are containers. - Using Docker commands, he accesses the control plane container and shows the directory (`/etc/kubernetes/manifests`) where static pod manifests are stored. - Removing the scheduler’s YAML file stops the scheduler pod, causing new pods to remain in a pending state until the manifest is restored. 6. **Manual Scheduling**: - Manual scheduling involves specifying the `nodeName` field in a pod’s configuration to bypass the scheduler. - Pods with `nodeName` specified are scheduled directly on the designated node without scheduler intervention. - The scheduler only handles pods without the `nodeName` field, scanning for pending pods and assigning them to nodes based on its logic. 7. **Key Takeaways**: - Scheduler is essential for automated pod scheduling but does not manage static pods. - Static pods are controlled by the kubelet and rely on manifest files in a specific directory. - Manual scheduling can be achieved by specifying the `nodeName` field in a pod’s configuration. - Troubleshooting control plane issues often involves checking the static pod manifests in `/etc/kubernetes/manifests`. 8. **Engagement and Assignment**: - The presenter sets a target of 130 comments and 130 likes for the video. - Viewers are encouraged to follow along with hands-on demos and complete an assignment to practice the concepts on their own home labs. This summary captures the key points and flow of the video content while maintaining clarity and conciseness.
Course: Certified Kubernetes Administrator Full Course For beginners | CKA 2025
This playlist contains the complete CKA series for beginners, based on the latest 2025 curriculum. It includes 40+ videos with hands-on demos, assignments, and exam-based scenarios. We will cover everything from the basics to the Advanced, including fundamental concepts such as Docker, containers, Docker storage and networking, DNS, etc.
View Full Course