Context Propagation

Create Cluster

15 minutes

In this step, you’ll create a lightweight Kubernetes cluster using k3d with a local container registry for workshop images.

Our setup script creates:

Create the Cluster

bash
cd ~/workshop/context-propagation
make setup-k3d

Validation Checklist

1. Confirm k3d cluster exists

bash
k3d cluster list

2. Confirm Kubernetes is reachable

bash
kubectl cluster-info
kubectl get nodes

3. Confirm k3d containers are running

bash
docker ps --filter name=k3d-$INSTANCE --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'

4. Verify the RabbitMQ port mapping explicitly

bash
docker ps --filter name=k3d-$INSTANCE-cluster-serverlb --format '{{.Ports}}'

Troubleshooting

Here are some of the potential issues you may encounter in this step & suggested remediation steps.

Click Here for Troubleshooting Guidance

Potential Issue 1: Port already in use

If port 30080 or 5111 is taken, either stop the conflicting service or edit scripts/setup-k3d.sh to use different ports.

Potential Issue 2: RabbitMQ UI not loading (missing 15672 on loadbalancer)

If http://(your-instance-url):15672 does not load, check whether k3d mapped the port:

bash
docker ps --filter name=k3d-cosmic-shop-serverlb --format '{{.Ports}}'

If 15672 is absent: Workaround without recreating the cluster - port-forward in a separate terminal:

bash
kubectl -n cosmic-shop port-forward svc/rabbitmq 15672:15672

Keep that terminal open, then open http://(your-instance-url):15672 (guest / guest).

Potential Issue 3: Cluster already exists

The script skips creation if a cluster named cosmic-shop already exists. To start fresh: Navigate to project root [~/workshop/context-propagation]

bash
// cd ~/workshop/context-propagation
k3d cluster delete cosmic-shop
make setup-k3d
Last Modified ·