[enable the Ingress controller on Minikube]
$ minikube addons enable ingress

[verify that the NGINX Ingress controller is running]
$ kubectl get pods -n ingress-nginx

[deploy a hello world application]
$ kubectl create deployment web --image=gcr.io/google-samples/hello-app:1.0

[verify the Deployment]
$ kubectl get deployment web

[expose the deployment]
$ kubectl expose deployment web --type=NodePort --port=8080

[verify the service]
$ kubectl get service web

[visit the service via NodePort]
$ minikube service web --url

[Invoke the URL obtained in the output of the previous step]
$ curl http://IP_ADDRESS:PORT_NO
Hello, world!
Version: 1.0.0
Hostname: web-55b8c6998d-8k564

[create an Ingress]
$ kubectl apply -f example-ingress.yaml
$ kubectl apply -f https://k8s.io/examples/service/networking/example-ingress.yaml

[verify the Ingress IP Address]
$ kubectl get ingress
NAME              CLASS   HOSTS                 ADDRESS       PORTS   AGE
example-ingress   nginx   hello-world.example   172.17.0.15   80      38s

[verify that the Ingress controller is directing traffic]
$ curl --resolve "hello-world.example:80:$( minikube ip )" -i http://hello-world.example
Hello, world!
Version: 1.0.0
Hostname: web-55b8c6998d-8k564

[create another deployment]
$ kubectl create deployment web2 --image=gcr.io/google-samples/hello-app:2.0

[verify the Deployment]
$ kubectl get deployment web2

[expose the deployment]
$ kubectl expose deployment web2 --port=8080 --type=NodePort

[edit the existing Ingress and add the following lines at the end]
$ kubectl apply -f example-ingress.yaml

[access the Ingress]
● access the 1st version of the Hello World app
$ curl --resolve "hello-world.example:80:$( minikube ip )" -i http://hello-world.example
Hello, world!
Version: 1.0.0
Hostname: web-55b8c6998d-8k564
● access the 2nd version of the Hello World app
$ curl --resolve "hello-world.example:80:$( minikube ip )" -i http://hello-world.example/v2
Hello, world!
Version: 2.0.0
Hostname: web2-75cd47646f-t8cjk
