INGRESS_IP
environment variable is supposed to be set during the setup. You can always set it this way:export INGRESS_IP=$(kubectl get svc ingress-nginx-controller -n ingress-nginx -o jsonpath='{.status.loadBalancer.ingress[].ip}')
Check the manifests:
cd /workspaces/helm/01_apps-with-only-manifests
tree .
kubectl create ns dev
kubectl create -f dev/blue
Check the status of the pods and see the blue pod running:
kubectl get pods -n dev
Afterwards, you can visit the app via curl:
curl http://${INGRESS_IP}/dev/blue
If you want to reach it via browser, you first need to port-forward ingress-nginx-controller service:
kubectl port-forward svc/ingress-nginx-controller -n ingress-nginx 80
Then, reach via below URLs:
echo "https://${CODESPACE_NAME}-80.app.github.dev/dev/blue"
kubectl create -f dev/red
Check the status of the pods and see the red and blue pods running:
kubectl get pods -n dev
Afterwards, you can visit the app via curl:
curl http://${INGRESS_IP}/dev/red
If you want to reach it via browser, you first need to port-forward ingress-nginx-controller service:
kubectl port-forward svc/ingress-nginx-controller -n ingress-nginx 80
Then, reach via below URLs:
echo "https://${CODESPACE_NAME}-80.app.github.dev/dev/red"
kubectl create ns prod
kubectl create -f prod/blue
Check the status of the pods and see 3 blue pods running:
kubectl get pods -n prod
Afterwards, you can visit the app via curl:
curl http://${INGRESS_IP}/prod/blue
If you want to reach it via browser, you first need to port-forward ingress-nginx-controller service:
kubectl port-forward svc/ingress-nginx-controller -n ingress-nginx 80
Then, reach via below URLs:
echo "https://${CODESPACE_NAME}-80.app.github.dev/prod/blue"
kubectl create -f prod/red
Check the status of the pods and see 3 red and 3 blue pods running:
kubectl get pods -n prod
Afterwards, you can visit the app via curl:
curl http://${INGRESS_IP}/prod/red
If you want to reach it via browser, you first need to port-forward ingress-nginx-controller service:
kubectl port-forward svc/ingress-nginx-controller -n ingress-nginx 80
Then, reach via below URLs:
echo "https://${CODESPACE_NAME}-80.app.github.dev/prod/red"
# delete the created resources
kubectl delete -f dev/**,prod/**