How to: Lab 9.4. Multiple hosts ingress
1. Review the _IngressClass_ resource object
2. List the Ingress classes created by the minikube ingress addon
3. Create two Deployments `nginx` and `httpd`
4. Expose both deployments as `Cluster-IP` on port 80
5. Create an Ingress with the following:
   - redirects requests for `nginx.yourchosenhostname.com` to the `nginx` Service
   - redirects requests for `httpd.yourchosenhostname.com` to the `httpd` Service
   - both rules should use a `Prefix` path type
6. Review created resources
7. Confirm Ingress _PathType_ and _IngressClass_
8. Review the _IngressClass_ resource YAML form to determine why it was assigned by default
9. Add an entry to `/etc/hosts` that maps the minikube Node IP to hostnames below:
   - `$(minikube ip)  nginx.yourchosenhostname.com`
   - `$(minikube ip)  httpd.yourchosenhostname.com`
10. Verify you can access both deployments via their subdomains
11. Delete created resources
lab9.4 solution
```sh
kubectl explain ingressclass | less
kubectl explain ingressclass --recursive | less
kubectl create deploy nginx --image=nginx --dry-run=client -o yaml > lab9-4.yaml
echo --- >> lab9-4.yaml
kubectl expose deploy nginx --port=80 --dry-run=client -o yaml >> lab9-4.yaml
echo --- >> lab9-4.yaml
kubectl create deploy httpd --image=httpd --dry-run=client -o yaml >> lab9-4.yaml
echo --- >> lab9-4.yaml
kubectl expose deploy httpd --port=80 --dry-run=client -o yaml >> lab9-4.yaml
echo --- >> lab9-4.yaml
kubectl create ingress myingress --rule="nginx.yourchosenhostname.com/*=nginx:80" --rule="httpd.yourchosenhostname.com/*=httpd:80" --dry-run=client -o yaml > lab9-4.yaml
echo --- >> lab9-4.yaml
kubectl apply -f lab9-4.yaml
kubectl get ingress,all
kubectl get ingress myingress -o yaml | less # `pathType: Prefix` and `ingressClassName: nginx`
kubectl get ingressclass nginx -o yaml | less # annotation `ingressclass.kubernetes.io/is-default-class: "true"` makes this class the default
echo "
$(minikube ip)  nginx.yourchosenhostname.com
$(minikube ip)  httpd.yourchosenhostname.com
" | sudo tee -a /etc/hosts
curl nginx.yourchosenhostname.com
curl httpd.yourchosenhostname.com
kubectl delete -f lab9-4.yaml