Hands-on task
A Service for the website
Deployment web is already running — two pods serving the shop's website. But reaching the pods directly is awkward: there are several of them, and their addresses change when they restart. That's what a Service is for in Kubernetes.
Create a Service web on port 80 that leads to this Deployment's pods. Then open the website through it: the home page has a code word — write it to /root/code.txt.
- kubernetes
- service
- kubectl expose
- port-forward
- curl