What is the smallest deployable unit in Kubernetes?
Explanation
A Pod is the smallest deployable unit in Kubernetes. It can contain one or more containers that share the same network namespace and storage volumes.
Which Kubernetes object ensures a specified number of Pod replicas are running at all times?
Explanation
A ReplicaSet ensures that a specified number of pod replicas are running at any given time. Deployments manage ReplicaSets and provide declarative updates.
What type of Kubernetes Service exposes an application outside the cluster using the cloud provider's load balancer?
Explanation
A LoadBalancer Service type provisions an external load balancer from the cloud provider (e.g., AWS ELB, GCP Load Balancer) and routes external traffic to the pods.
Which kubectl command shows the logs of a running pod?
Explanation
'kubectl logs <pod-name>' streams the logs from a container in a pod. Use -f to follow the log stream and -c to specify a container in a multi-container pod.
What is the purpose of a Kubernetes Namespace?
Explanation
Namespaces provide a mechanism for isolating groups of resources within a single cluster. They are ideal for separating environments (dev, staging, prod) or teams.
Which Kubernetes object is best suited for storing sensitive data like passwords and API tokens?
Explanation
Secrets are designed to store sensitive information such as passwords, tokens, and keys. Unlike ConfigMaps, Secret data is base64-encoded and can be encrypted at rest.
What does a DaemonSet ensure in Kubernetes?
Explanation
A DaemonSet ensures that a copy of a Pod runs on all (or some selected) nodes. Common use cases include log collectors (Fluentd), monitoring agents (Prometheus Node Exporter), and CNI plugins.
Which component is responsible for scheduling pods onto nodes in Kubernetes?
Explanation
The kube-scheduler watches for newly created Pods with no assigned node and selects a node for them to run on based on resource requirements, constraints, and policies.
What is the default restart policy for a Kubernetes Pod?
Explanation
The default restartPolicy for a Pod is 'Always', which means Kubernetes will restart the containers in a pod whenever they exit, regardless of the exit code.
Which command is used to apply a Kubernetes manifest file?
Explanation
'kubectl apply -f manifest.yaml' is the declarative approach to manage Kubernetes resources. Unlike 'kubectl create', it can update existing resources without error.