What is the smallest deployable unit in Kubernetes?
A Pod.
Name the 3 multi-container pod patterns.
Sidecar / Adapter / Ambassador.
What is an Init Container?
A container that runs to completion before the main application container starts.
What is a Job in K8s?
A resource that creates one or more Pods and ensures a specified number of them successfully terminate.
What is a CronJob?
A Job that runs on a recurring schedule (like a Linux crontab).
How do you create a pod named ‘nginx’ using kubectl imperatively?
kubectl run nginx –image=nginx
How do you generate a YAML file for a pod without creating it?
Add the flags ‘–dry-run=client -o yaml’ to the command.
How do you override the ‘ENTRYPOINT’ of a Docker image in a K8s Pod spec?
Use the ‘command’ field in the container spec.
How do you override the ‘CMD’ of a Docker image in a K8s Pod spec?
Use the ‘args’ field in the container spec.
If an Init Container fails to start and the restartPolicy is ‘Always’; what happens?
The Pod restarts repeatedly until the Init Container succeeds.
How can two containers in the same Pod communicate via localhost?
By sharing the same network namespace (standard Pod behavior).
What is the effect of setting ‘terminationGracePeriodSeconds’ to 0?
The Pod is killed immediately (SIGKILL) without waiting for a graceful shutdown (SIGTERM).
How do you share a specific directory between a sidecar and a main container?
Create an ‘emptyDir’ volume and mount it in both containers at the desired paths.
How do you identify if a running pod is a ‘Static Pod’ just by looking at its name?
It will usually have the node name appended to the end (e.g., kube-apiserver-control-plane).
If you delete a Static Pod using kubectl, what happens?
The Kubelet will automatically restart it because its manifest still exists in the static pod directory.
Which component is responsible for watching the static pod directory and managing those pods?
The Kubelet.
What is the ‘Mirror Pod’?
A dummy pod created by the Kubelet on the API server so that static pods are visible via kubectl.
What is a Static Pod in Kubernetes?
A pod managed directly by the kubelet on a specific node via local files, bypassing the API server.
What is a Dynamic Pod in Kubernetes?
A pod managed by the control plane (API server) and scheduled across the cluster by controllers like Deployments.
What is the kube-apiserver?
The central management hub and front end for the Kubernetes control plane that exposes the Kubernetes API.
What is the etcd?
A consistent and highly-available key-value store used as Kubernetes’ backing store for all cluster data.
What is the kube-scheduler?
The control plane component that assigns Pods to Nodes based on resource requirements and policy constraints.
What is the kube-controller-manager?
A daemon that embeds the core control loops (like Node or Job controllers) to regulate the state of the cluster.
What is the kubelet?
The node agent that ensures containers are running in a Pod by following instructions (PodSpecs) from the control plane.