What is Kubernetes?
Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, networking, and management of containerized applications across a cluster of machines.

What component is responsible for maintaining the desired state of a cluster?
The Kubernetes control plane maintains the desired state of the cluster through several components working together, primarily the API Server, etcd, Scheduler, and Controllers.
What are the key components within the control plane?
API Server: The primary entry point for all communications within the cluster.
etcd: It is a distributed key-value store that acts as Kubernetes' source of truth. It stores cluster configuration, desired state, metadata, and various cluster objects.
Controllers: Components that constantly monitor the API server to compare the current state with the desired state and fix any discrepancies.
Scheduler (kube-scheduler): Watches for newly created Pods that do not yet have a node assigned. Selects the most suitable worker node based on resource availability, policies, and constraints.
How does a pod get assigned to a specific machine?

This is handled by the scheduler. It watches for new pods without assigned nodes and selects the best fit by:
Filtering out nodes that lack sufficient resources (like CPU or memory) or have taints that the pod cannot tolerate. Scoring the remaining nodes and picking the highest-rated one.
Which component actually starts the containers once a node is selected?

The kubelet, which is an agent running on every node, performs the actual work. Once a pod is assigned to its node, the kubelet pulls the container image and tells the container runtime to start it.
How does Kubernetes handle container health?
The kubelet monitors containers using liveness, readiness, and startup probes. If a liveness probe fails, the kubelet restarts the container according to the Pod's restart policy.
How do pods communicate with each other across different nodes?
Kubernetes follows the Pod Networking Model where every Pod gets its own IP address and can communicate with other Pods without NAT. This connectivity is usually provided by a CNI plugin such as Calico, Cilium, Flannel, or Weave.
Why should you use a Service instead of communicating directly via pod IP addresses?
Pods are temporary; when a pod is replaced, it receives a new IP address. A Service provides a stable virtual IP (ClusterIP) and DNS name. It uses label selectors and EndpointSlices to route traffic to healthy backend Pods.

You can learn more about Kubernetes from some of our other popular blogs here :






Discussion