A container packages and runs a process with its dependencies. A Pod is the Kubernetes unit in which one or more containers are scheduled and given a shared network and storage context. That distinction changes how you deploy, restart, expose and troubleshoot an application. A Pod is not merely another word for a Docker container, nor is it a persistent virtual machine.
What a container is responsible for
A container image contains the application filesystem and startup configuration. At runtime, a container executes one or more processes using kernel isolation mechanisms. Containers on the same host may share the host kernel; they are not separate complete operating systems by default. The container’s own restart lifecycle is different from the Kubernetes Pod lifecycle.
What a Pod adds
Kubernetes schedules a Pod as one unit to a node. Containers in that Pod share a network namespace and can communicate using localhost and different ports. They may also mount a shared volume when the specification requests one. A Pod owns its scheduling and lifecycle settings; it is usually created indirectly by a Deployment or Job rather than by hand for production services.
A Pod can include an application container and a tightly coupled sidecar, but adding unrelated services to the same Pod makes scaling and failure isolation harder. Choose one Pod per independently scalable service unless the containers genuinely need the same scheduling fate.
Read a valid Pod manifest
The following YAML declares an application container and a short-lived scratch volume. It is illustrative: the example uses a standard web server image that may require elevated privileges depending on its configuration; a production manifest should pin an appropriately maintained image digest, set resource budgets and use a workload controller.
apiVersion: v1
kind: Pod
metadata:
name: demo-web
spec:
containers:
- name: web
image: nginx:stable
ports:
- containerPort: 80
volumeMounts:
- name: scratch
mountPath: /var/cache/nginx
volumes:
- name: scratch
emptyDir: {}
The emptyDir volume exists for the lifetime of the Pod and should not store critical durable data. It is discarded if the Pod is removed from the node. Persistent application data normally needs a PersistentVolumeClaim and an explicit backup policy.
Use a Deployment for replaceable web replicas
A Deployment manages replica Pods, rolling updates and replacement after failure. It is the normal starting point for a stateless web service. A Pod created without a controller is not automatically replaced by a Deployment when its node disappears.
kubectl create deployment demo-web --image=nginx:stable
kubectl get deployments,pods
kubectl describe pod <pod-name>
These commands assume a configured Kubernetes context and working cluster; they were not executed against a production cluster here. Inspect the image’s lifecycle and security policy before applying it outside an isolated lab.
Restarting a container does not create a new Pod
A container can restart within the same Pod under the restart policy. A Pod itself is generally a disposable object, and an orchestrator may create a replacement Pod with a different identity. Watch kubectl get pods and kubectl describe pod for status, events and restart counts rather than assuming every restart means the Pod was replaced.
Where networking and scaling differ
A Pod receives its own IP address within the cluster network. Containers inside the same Pod use localhost to talk to each other; different Pods communicate across the cluster network and often through a Service for stable discovery. A Deployment normally scales by creating more Pods, not by multiplying containers inside one existing Pod.
Troubleshoot by layer
If a container cannot start, inspect its image, command, environment and logs. If a Pod stays Pending, look at scheduling constraints, node readiness, quotas and storage. If a Service is unreachable, check its selector, EndpointSlices and network policy. Mixing these layers leads to unnecessary fixes that do not address the owning failure.
Source and next step
The official Kubernetes Pod documentation explains scheduling, OS requirements, ephemeral identity and controllers. After understanding Pods, practice with a Deployment, a Service and one health probe, then distinguish data persistence from container image storage. That is a practical progression for new operators.