Resources
OpenShift Day 2 Guide
Pods, Workloads, and Resource Management — a practical reference for running workloads on OpenShift.
Pod Fundamentals
A Pod is the smallest deployable unit in Kubernetes / OpenShift — one or more containers that share a network namespace, storage volumes, and lifecycle. Containers within a Pod communicate over localhost; storage mounts are shared across all containers in the Pod.
Minimal Pod Spec
apiVersion: v1
kind: Pod
metadata:
name: example-pod
namespace: mission-ops
labels:
app: example
tier: backend
spec:
containers:
- name: app
image: registry.example.com/myapp:1.2.3
ports:
- containerPort: 8080
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
env:
- name: LOG_LEVEL
value: "info"
volumeMounts:
- name: config
mountPath: /etc/config
volumes:
- name: config
configMap:
name: app-configPod Lifecycle Phases
Pod accepted by cluster; containers not yet running. Scheduler is placing it or images are pulling.
Pod bound to a node; at least one container is running or starting.
All containers exited with status 0 and will not restart (typical for Jobs).
All containers have exited; at least one exited non-zero or was terminated by the system.
Pod state could not be retrieved — usually a node communication issue.
Pod Networking & DNS
Each Pod gets its own IP on the cluster network. Containers share that IP — they communicate on localhost with different ports.
DNS format for a Service:
<service>.<namespace>.svc.cluster.local
Pods in the same namespace resolve the short name. Cross-namespace calls need the full DNS name.
Init Containers
Multi-Container Patterns
Sidecar
Runs alongside the main container. Common uses: log shipping, metrics scraping, service mesh proxy (Envoy/Istio).
Ambassador
Proxies network traffic on behalf of the main container. Useful for connection pooling or protocol translation.
Adapter
Transforms or normalises output from the main container — e.g. converting proprietary metrics to Prometheus format.