A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

March 7, 2018

Lab 8.1 / 8.2 Questions


In lab 8.1 using the nginx-one.yaml I am creating a deployment within the namespace accounting.

The deployment is sucessfull created and afterwards exposed on step 10 and on step 13 recreated to expose port 80.

joaocfernandes@master-node:~$ kubectl --namespace=accounting get ep nginx-one
NAME        ENDPOINTS                       AGE
nginx-one,   17m
joaocfernandes@master-node:~$ kubectl get service --all-namespaces
NAMESPACE     NAME         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE
accounting    nginx-one    ClusterIP   <none>        80/TCP          18m
default       kubernetes   ClusterIP       <none>        443/TCP         17d
kube-system   kube-dns     ClusterIP      <none>        53/UDP,53/TCP   17d
joaocfernandes@master-node:~$ kubectl -n accounting describe service nginx-one
Name:              nginx-one
Namespace:         accounting
Labels:            system=secondary
Annotations:       <none>
Selector:          app=nginx
Type:              ClusterIP
Port:              <unset>  80/TCP
TargetPort:        80/TCP
Session Affinity:  None
Events:            <none>


First Question:

In the step 13, we are asked to recreate the deployment to expose port 80. So in order to prove this I should curl or the pods directly ?

Second question:

Previously to step 13 I first exposed port 8080, then exposed 80. Is it necessary to expose the deployment again in order to update the exposed port? (I had to in my case or I did something wrong).


Click Here!