Phase 3: Kubernetes

1. Build and Load Images

2 min

Verify Your Cluster

Your workshop instance has K3d pre-installed. Confirm it’s running:

bash
kubectl get nodes

Build the Application Images

The K8s manifests reference locally-built images. Build them from the 02-obi-docker/ source:

bash
cd ~/workshop/obi/03-obi-k8s
docker build -t obi-workshop-frontend:latest ../02-obi-docker/frontend
docker build -t obi-workshop-order-processor:latest ../02-obi-docker/order-processor
docker build -t obi-workshop-payment-service:latest ../02-obi-docker/payment-service

Import Images into K3d

K3d uses containerd, not Docker, so images must be imported into the cluster. First, find your cluster name:

bash
k3d cluster list

Now import the images. CLUSTER_NAME should be available in your env or if it is not try:

text
export CLUSTER_NAME=$(k3d cluster list -o json |  jq -r '.[].name')
bash
k3d image import -c $CLUSTER_NAME \
  obi-workshop-frontend:latest \
  obi-workshop-order-processor:latest \
  obi-workshop-payment-service:latest

Tip

The script above automatically detects your cluster name. If you have multiple k3d clusters, you can specify it explicitly:

bash
k3d image import -c shw-ece9-cluster obi-workshop-frontend:latest obi-workshop-order-processor:latest obi-workshop-payment-service:latest
Last Modified ·