# Set up K3S cluster
# Disable the by-default Traefik installation
k3d cluster create demo --port 80:80@loadbalancer --port 443:443@loadbalancer --k3s-arg "--disable=traefik@server:0"
# Install Traefik with Gateway API enabled
# With no Gateway by default
# With the experimental channel enabled
helm repo add --force-update traefik https://traefik.github.io/charts
helm upgrade --install --create-namespace --namespace traefik traefik traefik/traefik -f ./traefik_values.yaml
# Check the GatewayClass
# No Gateway should be attached by default
gwctl describe gatewayclass traefik -n traefik
# Deploy the manifests
kubectl apply -f manifests/01-first-route
# Check the GatewayClass
# Traefik Gateway should be attached
gwctl describe gatewayclass traefik -n traefik
gwctl describe gateway traefik-gateway-http -n traefik
gwctl describe httproute httproute-whoami -n traefik
# Reach the backend
# The header X-Custom-Header with "demo" value has been added
curl http://whoami.docker.localhost/demo