← Quiz: Kubernetes Basics: all 10 questions
Quiz: Kubernetes Basics · Question 7 of 10
How does a Service know which pods to send traffic to?
How does a Service know which pods to send traffic to?
- A.It selects pods whose labels match its selector, such as app: courses-api
- B.It sends traffic to every pod in the cluster
- C.Pods register their IPs by email
- D.The scheduler hard-codes the IPs
Answer & explanation
Correct answer: It selects pods whose labels match its selector, such as app: courses-api
Labels are the glue between Deployments, pods and Services.
Can you get the rest right without peeking?
Take the timed Quiz: Kubernetes Basics quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →