Welcome to the Linux Foundation Forum!

practicing skills: question 42


Has anybody got an idea what is meant by this question:
42. Update both the pod and the service with selectors so that traffic for to the service IP shows the web server content

To me a pod can't have a selector and a service can.
So having a label in the pod and a selector to that label in the service would be enough.

It looks like the same as question 41c, only done for example from command line where it goes automatically:
41. Create a new service named webone-svc. The service should be accessible from outside the cluster.



  • chrispokorni
    chrispokorni Posts: 2,165

    Hi @kareldebeus,

    You are correct, the pods receive labels while the service receives a selector on the same label. Then the service with the matching label selector is able to forward traffic only to the pods with the expected label.



Upcoming Training