How to: Lab 8.1. Connecting applications with services
1. Create a simple deployment with name `webserver`
2. List created resources
3. List endpoints, and pods with their IPs
   - Can you spot the relationship between the Service, Endpoints and Pods?
4. Create a Service for the deployment, exposed on port 80
5. List created resources and note services fields `TYPE`, `CLUSTER-IP`, `EXTERNAL-IP` and `PORT(S)`
6. View more details of the Service and note fields `IPs`, `Port`, `TargetPort` and `Endpoints`
7. View the YAML form of the Service and compare info shown with output in [6]
8. Print the Service env-vars from one of the pods
9. Scale the deployment down to 0 replicas first, then scale up to 2 replicas
10. List all pods and their IPs
11. Print the Service env-vars from one of the pods and compare to results in [3]
12. List endpoints, and pods with their IPs
13. Access the app by the Service: `curl $ClusterIP:$Port`
14. Access the app by the Service from the container host: `minikube ssh` then `curl $ClusterIP:$Port`
15. Run a `busybox` Pod with a shell connected interactively and perform the following commands:
    - run `cat /etc/resolv.conf` and review the output
    - run `nslookup webserver` (service name) and review the output
    - what IPs and/or qualified names do these match?
16. Run a temporary `nginx:alpine` Pod to query the Service by name:
    - first run `kubectl run mypod --rm -it --image=nginx:alpine -- sh`
    - then once in container, run `curl $SERVICE_NAME:$PORT`
    - you should run `curl $SERVICE_NAME.$SERVICE_NAMESPACE:$PORT` if the Service and the temporary Pod are in separate Namespaces
17. Delete created resources
18. Explore the Service object and the Service spec
lab 8.1 solution
```sh