Software Containerisation

Table of Contents

Pods and Containers

Pod: smallest unit you can deploy to Kubernetes cluster

On the command line, run a pod with:

kubectl run --image <image-name> <pod-name> --port=<port-on-container-ip> --hostport=<port-on-host-ip>

Pod lifecycle has phases:

  1. Pending: cluster accepted pod, not all containers running yet.
  2. Running: pod bound to node, all containers created, at least one running/starting/restarting.
    • Succeeded: containers terminated successfully, will not restart.
    • Failed: all containers terminated, at least one with error.