The ultimate exam CKA series MOCk exam 3 : Q14

Hi Team,

The question mentioned below is not very clear. Could you please elaborate more on this?

Kindly also provide a detailed explanation of the solution ,as the solution mentioned the exam is not very clear to me ?

Solve this question on: ssh cluster3-controlplane


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 within the kubernetes cluster3, but at the moment, it is not working as expected.



Fix the issue so that other pods within cluster3 can use external-webserver-cka03-svcn service to access the webserver.

Thanks,
Sakshi

Hi @sakshibag80

This one is a bit complex.
This task says it has a webserver on student-node and exposed via some service over port 9999 on cluster3.
So the first thing you do is to check from a pod within the cluster whether the service is routing the traffic to the webserver?

We test the connectivity by k run -it --rm --restart=Never curl --image alpine/curl -- curl external-webserver-cka03-svcn.kube-public.svc
One thing to note is the Service is defined in the kube-public ns.

And, we are not able to connect to the webserver. Upon investigation, we see that there are no Endpoints configured for this Service.

So you need to create an Endpoint targeting the IP of the student node at 9999 and test the connectivity.

1 Like

to be honest while I was going through the course, I didn’t think there was a service type External…lol

I mean, I don’t remember it being mentioned in the course. I only remember three types being taught, while I was attempting the question, I looked up service types and realised that there’s another “ExternalName”. Is that a new development? or did I miss it during the CKA course?

It’s not part of the CKA exam, but it’s a legit service type. It’s a service that is used for pointing to an IP address that K8s does not control, but services in K8s need to create a “handle” for. So it generates a certain kind of endpoint. You might use it to refer to an external database, as an example.

1 Like