Create and configure the service front-end-service so it's accessible through NodePort and routes to the existing pod named front-end.
Suggested Answer: A
Get Premium CKA Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
31 comments · newest first
BE
Bette
10 months ago
Yup, it’s a standard method for exposing services.
LE
Leslie
11 months ago
Wait, does NodePort really work with existing pods like that?
LI
Ling
11 months ago
Just use `kubectl expose pod front-end --type=NodePort --name=front-end-service`.
HE
Hector
11 months ago
Totally agree, that's the way to do it!
EL
Elmira
11 months ago
I thought NodePort was only for services, not pods.
GW
Gwenn
11 months ago
I believe we have to set the selector to match the labels of the front-end pod, but I hope I remember the right labels from the practice questions.
EU
Eun
12 months ago
I'm a bit confused about how to link the service to the existing pod. Do we use the pod's name directly in the configuration?
DE
Devora
12 months ago
I remember practicing a similar question where we had to expose a pod, but I can't recall if we need to specify the port numbers explicitly.
BL
Blossom
1 year ago
I think we need to define the service type as NodePort, but I'm not entirely sure about the exact syntax for that.
MA
Maryrose
1 year ago
Alright, time to put my Kubernetes skills to the test. I'm feeling confident I can get this done.
SH
Shonda
1 year ago
No problem, I've got this. I'll just need to create a YAML file with the right service configuration and apply it.
AL
Aleshia
1 year ago
Wait, what's a NodePort service again? I'm a bit fuzzy on the different service types in Kubernetes.
SU
Susana
1 year ago
Okay, let me think this through step-by-step. I'll need to create a NodePort service and then link it to the existing front-end pod.
FR
Francesco
1 year ago
Hmm, this looks like a straightforward Kubernetes configuration task. I think I can handle this.
SH
Shanda
1 year ago
Haha, I bet the exam writer had a field day coming up with this one. Time to put our Kubernetes knowledge to the test!
RE
Reena
1 year ago
We got this! Let's tackle this Kubernetes challenge.
RO
Rozella
1 year ago
Don't forget to expose the service externally so it's accessible.
RA
Rasheeda
1 year ago
Make sure to configure the service to route to the existing front-end pod.
SL
Slyvia
1 year ago
Let's start by creating a NodePort service for the front-end.
JU
Jutta
1 year ago
Feels like a trick question. Is there a catch I'm missing?
TW
Twila
1 year ago
Franchesca: Yeah, just double-check everything and you should be good to go.
FR
Franchesca
1 year ago
User 2: Make sure to configure the service with the correct NodePort and route it to the front-end pod.
DE
Delmy
1 year ago
User 1: It's not a trick question, just follow the steps in the explanation.
AL
Alonso
1 year ago
I like how the image provides a visual representation of the expected solution.
SU
Sunny
2 years ago
This is a straightforward question. The solution explains the steps clearly.
RY
Ryan
1 year ago
Finally, we make sure it routes to the existing pod named front-end.
NI
Nickie
1 year ago
Then we configure it to be accessible through NodePort.
LA
Laurel
1 year ago
Okay, first we need to create the service front-end-service.
CH
Chu
2 years ago
That makes sense, it will make the service accessible externally.
KA
Kathrine
2 years ago
Yes, we can route it to the existing pod named front-end.
CH
Chu
2 years ago
I think we need to create a NodePort for the front-end service.