Coffee & Tea Demo
Prerequisites
This demo deploys a sample Coffee & Tea application using the Kubernetes Ingress NGINX Controller in QBO.
Deployment Options
Option 1: Deploy with QBOT (One-line)
This command sets up the full stack including the cluster, ingress controller, and the Coffee & Tea app.
Option 2: Manual Step-by-Step Deployment
Step 1: Deploy Kubernetes Cluster
See Cluster Deployment Guide
Step 2: Install the Ingress Controller
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.9.5/deploy/static/provider/cloud/deploy.yaml
|
Step 3: Deploy the Coffee & Tea App
kubectl apply -f /home/alex/qbo-demo/coffee/ingress-nginx/cafe
|
Step 4: Patch the Ingress Service
kubectl patch svc ingress-nginx-controller -n ingress-nginx -p '{"spec":{"externalTrafficPolicy":"Cluster"}}' kubectl patch svc ingress-nginx-controller -n ingress-nginx --type='json' -p '[{"op":"replace","path":"/spec/type","value":"NodePort"}]'
|
Step 5: Access the App
On Linux
NODEPORT=$(kubectl get svc -n ingress-nginx -o json \ | jq -r '.items[].spec.ports[]? | select(.port == 443 and .nodePort) | .nodePort')
NODELST=$(kubectl get nodes -o json \ | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address')
for ip in $NODELST; do echo "https://$ip:$NODEPORT" done
|
On Windows (WSL2)
kubectl patch svc ingress-nginx-controller -n ingress-nginx --type='json' -p '[{"op":"replace","path":"/spec/type","value":"ClusterIP"}]' kubectl port-forward svc/ingress-nginx-controller -n ingress-nginx 9443:443
|
Step 6: Test
for ip in $NODELST; do curl -kv -H 'host: cafe.example.com' https://$ip:$NODEPORT/coffee done
|