Context Propagation
Create Cluster
In this step, you’ll create a lightweight Kubernetes cluster using k3d with a local container registry for workshop images.
Our setup script creates:
- A single server k3d cluster named
$INSTANCE-cluster - A local Docker registry on port 5111 for pushing workshop images
- NodePort mappings for the shop UI (30080) and RabbitMQ management UI (15672)
Create the Cluster #
bash
cd ~/workshop/context-propagation
make setup-k3dtext
Creating k3d cluster 'cosmic-shop' with local registry on port 5111...
...
k3d cluster 'cosmic-shop' ready.Validation Checklist #
1. Confirm k3d cluster exists #
bash
k3d cluster listtext
NAME SERVERS AGENTS LOADBALANCER
1234-cluster 1/1 1/1 true2. Confirm Kubernetes is reachable #
bash
kubectl cluster-info
kubectl get nodestext
Kubernetes control plane is running at https://0.0.0.0:6443
...
NAME STATUS ROLES AGE VERSION
k3d-$INSTANCE-cluster-server-0 Ready control-plane,master 45s v1.28.x+k3s1
k3d-$INSTANCE-cluster-agent-0 Ready <none> 40s v1.28.x+k3s1All nodes must show Ready in the STATUS column.
3. Confirm k3d containers are running #
bash
docker ps --filter name=k3d-$INSTANCE --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'text
NAMES STATUS PORTS
k3d-$INSTANCE-serverlb Up 2 minutes 0.0.0.0:30080->30080/tcp, 0.0.0.0:15672->15672/tcp, ...
k3d-$INSTANCE-server-0 Up 2 minutes
k3d-$INSTANCE-agent-0 Up 2 minutesYou should see the load balancer exposing ports 30080 and 15672.
4. Verify the RabbitMQ port mapping explicitly #
bash
docker ps --filter name=k3d-$INSTANCE-cluster-serverlb --format '{{.Ports}}'text
0.0.0.0:30080->30080/tcp, 0.0.0.0:15672->15672/tcp, ...If 15672 is missing, the cluster was created without the RabbitMQ port mapping. The management UI will not load at http://(your-instance-url):15672 until you recreate the cluster with make setup-k3d (see Troubleshooting
below).
Troubleshooting #
Here are some of the potential issues you may encounter in this step & suggested remediation steps.
