Linux Foundation CKAD Exam - Topic 6 Question 32 Discussion
Posted by
Fannie on
Jan 27, 2024 at 05:36 AM
Refer to Exhibit.
Set Configuration Context:
[student@node-1] $ | kubectl
Config use-context k8s
Context
A container within the poller pod is hard-coded to connect the nginxsvc service on port 90 . As this port changes to 5050 an additional container needs to be added to the poller pod which adapts the container to connect to this new port. This should be realized as an ambassador container within the pod.
Task
* Update the nginxsvc service to serve on port 5050.
* Add an HAproxy container named haproxy bound to port 90 to the poller pod and deploy the enhanced pod. Use the image haproxy and inject the configuration located at /opt/KDMC00101/haproxy.cfg, with a ConfigMap named haproxy-config, mounted into the container so that haproxy.cfg is available at /usr/local/etc/haproxy/haproxy.cfg. Ensure that you update the args of the poller container to connect to localhost instead of nginxsvc so that the connection is correctly proxied to the new service endpoint. You must not modify the port of the endpoint in poller's args . The spec file used to create the initial poller pod is available in /opt/KDMC00101/poller.yaml
I'm surprised they didn't mention updating the poller args earlier.
GA
Gabriele12 months ago
HAproxy is a solid choice for this setup!
MA
Man12 months ago
Wait, why do we need an ambassador container? Seems unnecessary.
TA
Tayna1 year ago
Totally agree, that's the way to go!
EL
Elmer1 year ago
Just edit the service with `kubectl edit svc nginxsvc` to change the port.
GU
Gussie1 year ago
I definitely remember needing to change the args for the poller container, but I can't recall if we used localhost or something else in our practice.
AM
Amber1 year ago
I feel a bit confused about the ConfigMap part. Did we cover how to mount it properly in the container?
PA
Paulene1 year ago
I think we did a similar question where we had to add a container to a pod. I hope I can recall the correct syntax for the YAML file.
WE
Weldon1 year ago
I remember we practiced updating service ports, but I'm not entirely sure how to edit the service definition directly.
TR
Tracie1 year ago
No problem, I've done stuff like this before. I'll update the service, create the ConfigMap, and add the HAproxy container. Updating the poller args should be straightforward.
NU
Nu1 year ago
Whoa, this is a lot of moving parts. I better make sure I don't miss any details. Updating the service, creating the ConfigMap, and modifying both containers - I'll need to stay organized.
HO
Howard1 year ago
Okay, let's see. I think I understand the main tasks - update the service, add the HAproxy container, and modify the poller container. I'll need to reference the YAML files and ConfigMap closely.
RO
Rolland1 year ago
Hmm, this looks like a tricky one. I'll need to carefully read through the requirements and plan out my steps before diving in.
LO
Loren1 year ago
I'm a bit confused by the wording of this question. Is it asking about the properties or characteristics of a flow port that's linked to a flow specification? I'll have to re-read it a few times.
AS
Ashlee1 year ago
Hmm, I'm a bit confused about the relationship between Bharat Medicals and Maurya Logistics. Do they have equal responsibilities when it comes to consumer data protection?
AR
Arminda1 year ago
Hmm, I'm not sure about the different roles and responsibilities here. Let me think this through carefully.
SH
Sheridan1 year ago
Hmm, I'm a bit confused on how to approach this. I know it's about probabilities, but I'm not sure how to calculate the probability of no defects given the individual probabilities of the two defect types.
LE
Leanora2 years ago
Ah, the joys of working with Kubernetes. At least it's not a 'write a new YAML from scratch' question. That would be a real head-scratcher!
AL
Alberta1 year ago
↳ replying to Leanora
Tran: True, the satisfaction of solving a Kubernetes puzzle is unmatched.
TR
Tran1 year ago
↳ replying to Leanora
User 2: Definitely, but it's always a good feeling when you figure it out.
AR
Arlene1 year ago
↳ replying to Leanora
User 1: I know right, working with Kubernetes can be challenging sometimes.
EA
Earleen2 years ago
Alright, time to put my Kubernetes ninja skills to the test! I bet the exam writers are chuckling at us trying to figure this out.
CE
Celestina1 year ago
↳ replying to Earleen
Agreed, let's tackle this task step by step and show those exam writers what we're made of!
RO
Rosendo1 year ago
↳ replying to Earleen
Definitely! Let's follow the steps provided and we'll have that pod updated in no time.
KE
Keva1 year ago
↳ replying to Earleen
I know right, Kubernetes can be tricky sometimes. But we got this!
OZ
Ozell2 years ago
Wait, so we have to edit the pod and service YAML files directly? No kubectl commands to do this? That's a bit old-school, but I guess it gets the job done.
BR
Breana1 year ago
↳ replying to Ozell
It may seem old-school, but it's a reliable way to make the necessary changes.
MA
Marjory1 year ago
↳ replying to Ozell
Yes, you need to edit the pod and service YAML files directly for this task.
JU
Justine1 year ago
↳ replying to Ozell
It may seem old-school, but it's a reliable way to make the necessary changes.
SH
Sherell1 year ago
↳ replying to Ozell
Yes, you need to edit the pod and service YAML files directly for this task.
EL
Elroy2 years ago
The solution provided explains how to update the service and add the HAproxy container with the necessary configuration. We should follow those steps.
CA
Catalina2 years ago
Yes, we need to add an HAproxy container named haproxy bound to port 90 to the poller pod.
KY
Kyoko2 years ago
Hmm, the ConfigMap injection seems a bit tricky. Hope I don't mess up the haproxy.cfg file. Fingers crossed it all works as expected!
EL
Elroy2 years ago
I think the task is asking us to update the nginxsvc service to serve on port 5050.
JO
Joanna2 years ago
Okay, this looks straightforward. Update the service port, add the HAproxy container, and update the poller container's args. Gotta love these 'modify existing resources' tasks!
SY
Sylvie1 year ago
↳ replying to Joanna
True, that's an important step to ensure the configuration is injected correctly.
EL
Eladia2 years ago
↳ replying to Joanna
Don't forget to create the ConfigMap for haproxy-config.
SA
Sage2 years ago
↳ replying to Joanna
Yeah, it's all about updating configurations and adding new containers.
JE
Jeff2 years ago
↳ replying to Joanna
Sounds like a fun challenge!
SA
Sage2 years ago
The provided solution explanation seems clear and helpful though.
SA
Sage2 years ago
I agree, updating the nginxsvc service and adding an HAproxy container requires attention to detail.
SA
Sage2 years ago
I found the task in the exam quite challenging.
Log in to Pass4Success
Sign in:
Report Comment
Is the comment made by USERNAME spam or abusive?
Commenting
In order to participate in the comments you need to be logged-in.
You can sign-up or
login