Sobes.tech
Middle

What is a Pod in Kubernetes?

sobes.tech AI

Answer from AI

A Pod in Kubernetes is the smallest and simplest unit of deployment, representing one or more containers running on a single node. Containers within a Pod share the network stack (IP address, ports) and storage (volumes).

Main characteristics of a Pod:

  • All containers in a Pod run in the same environment and can communicate via localhost.
  • A Pod provides resource sharing and simplifies management of related containers.
  • Typically, a Pod is created and managed by controllers (e.g., Deployment), not directly.

Example of a Pod description in YAML:

apiVersion: v1
kind: Pod
metadata:
  name: example-pod
spec:
  containers:
  - name: nginx-container
    image: nginx:latest
    ports:
    - containerPort: 80

This Pod contains a single container with Nginx.