Hello,
It is not quite clear to me what has to be done in this exercise:
Anyway, the existing service external-webserver-cka03-svcn in kube-public ns is connected to the existing pod server1-cka03-svcn in the same ns.
The endpoint in the service is exactly the IP of the pod, the match label in the service is exactly the same label that the pod has.
In fact I am able to curl the service from any other pod in the cluster. I used pod pod-34 in ns spectra-1267 and it can easily curl service external-webserver-cka03-svcn in ns kube-public
Since the exercise says the web application (i.e. the external-webserver service) needs to listen on port 9999, I then changed the service configuration to listen on that port and tried the curl again. It works.
Service modified to listen on 9999
Curl from external pod to service on port 9999 still works.
The solution of the exercise says that the svc has no endpoints and we have to amend them, but that is not true, as per what I showed above.
Could you please explain to me what is the exercise about and why it does not reflect the real state of the pods/services?
The sentence
" We have an external webserver running on student-node which is exposed at port 9999
. We have created a service called external-webserver-cka03-svcn
that can connect to our local webserver from …"
is confusing.
The external webserver mentioned in the first sentence is exactly the service called external-webserver-cka03-svcn mentioned in the second sentence.
At the beginning I thought that the 2 things were 2 separated entities and that the external webserver was a Linux service, but could not find the port open nor the service running on the student node.
In addition, the mentioned service does not have port 9999 exposed (but 80). Maybe you can say that it is supposed to be exposed on 9999.
Regards