Kubernetes and Cloud Native Associate (KCNA)Kubernetes FundamentalsEasy
A developer needs to deploy a simple web application to a Kubernetes cluster. The application consists of a single container image and should be accessible internally within the cluster. Which Kubernetes object is the most fundamental and direct way to run this single container?
- ADeployment
- BReplicaSet
- CPod
- DService
Show answer & explanationAnswer & explanation
Correct answer: C. Pod
A Pod is the smallest deployable unit in Kubernetes and directly encapsulates one or more containers. While other objects like Deployments manage Pods, the Pod itself is where the container runs.
Why the other options are wrong
- A. Deployments manage the desired state of Pods, but a Pod is the direct runtime for containers.
- B. ReplicaSets ensure a specified number of Pod replicas are running, but Pods are the actual running units.
- D. Services provide stable network access to a set of Pods, not the runtime for containers.
Kubernetes Pod
The smallest and most fundamental deployable unit in Kubernetes, representing a single instance of a running process in a cluster.
- Encapsulates one or more containers (e.g., Docker containers).
- Shares network namespace, IP address, and storage volumes among its containers.
- Designed to run co-located, co-managed applications.
Memory trick: Pods are the 'peas' in the Kubernetes 'pod' – smallest and most essential.