10 Add service
To expose an deployment to the outside world (Lan/Wan etc.) you need to specify a Service. The file is already created. Perform the steps below, to configure it, to match your deployment.
Edit the
service.yml
file, so theSelector: app name
matches the name in the deployment.Correct
studentx
to the correct student number.Change the nodeport, to match your student number, in the last 2 digits.
- student0 = 30010
- student1 = 30011
- student2 = 30012
- student3 = 30013
- student4 = 30014
- student5 = 30015
- student6 = 30016
- student7 = 30017
- student8 = 30018
- student9 = 30019
- student10 = 30020
- student11 = 30021
- student12 = 30022
- student13 = 30023
- student14 = 30024
- student15 = 30025
- student16 = 30026
- student17 = 30027
- student18 = 30028
- student19 = 30029
- student20 = 30030
In this demo enviroment, we are using Nodeport, to expose the deployments. Talk about the different ways you can expose a service :
- NodePort
- LoadBalancer
- Ingress