
Kubernetes Basics
Pods, Deployments, Services, ConfigMaps, Secrets, namespaces, kubectl commands, troubleshooting CrashLoopBackOff
1What is a Pod in Kubernetes?
What is a Pod in Kubernetes?
Answer
A Pod is the smallest deployable unit in Kubernetes. It encapsulates one or more containers that share the same network namespace, storage space, and IP address. Containers within a Pod can communicate via localhost and share the same lifecycle. In most cases, a Pod contains a single main container, but sidecar containers can be added for features like logging or monitoring.
2What are the two main components of the Kubernetes control plane?
What are the two main components of the Kubernetes control plane?
Answer
The Kubernetes control plane mainly comprises the API Server (kube-apiserver) which exposes the Kubernetes API and serves as the entry point for all operations, and etcd which is the distributed key-value database storing cluster state. Other components include the scheduler (kube-scheduler) that assigns Pods to nodes, and the controller manager (kube-controller-manager) that runs control loops. The API Server is the central component that all other components communicate with.
3What is the role of kubelet in a Kubernetes node?
What is the role of kubelet in a Kubernetes node?
Answer
The kubelet is an agent running on each worker node of the cluster. It is responsible for managing Pods on its node: it monitors Pod specifications assigned by the API Server, starts and stops containers via the container runtime, monitors their health via probes (liveness, readiness), and reports status to the control plane. The kubelet ensures that containers defined in PodSpecs are running and healthy.
What is the difference between a liveness probe and a readiness probe?
What are labels used for in Kubernetes?
Which kubectl command shows events for a specific Pod?
+23 interview questions
Master DevOps for your next interview
Access all questions, flashcards, technical tests and interview simulators.
Start for free