- Demonstrate the ability to write a simple ingress yml file.
- Use an ingress controller (for example, ingress-nginx) to enable sticky session load-balancing between 2 replicas using cookies
- Define a basic horizontal pod auto-scaler and demonstrates it works as expected for a scaling metric of your choosing
- Run the following command to start the server
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/deploy/static/provider/cloud/deploy.yaml
- Run the following command to wait for the ingress controller pods within the namespace
ingress-nginx
to all be runningkubectl wait --namespace ingress-nginx --for=condition=ready pod \ --selector=app.kubernetes.io/component=controller --timeout=120s
- Run the following command to deploy the images as K8s Deployments, Services and the Ingress
cd k8s/development kubectl apply -f .
- Get the nginx welcome message through querying the following link
curl http://kubernetes.docker.internal