Hi everyone, I am trying answer the quiz question mentioned in the below screenshot. I used imperative commands to create a yaml file(node-port.yaml) and the solutions file was “service-definition-1.yaml” … when i create a service using node-port.yaml it’s not working, however, webapp ui is visible when i use the solution document. Can you let me know the mistake that i am doing here? Thanks!
Edit: I used the selector(forgot to show it in the screenshot), still was unable to access the service. If someone can explain me the concept, I would appreciate it.
The service selectors should match the labels of pods, So try to use “kubectl expose” when creating service for pod/deployment. This way service selectors will be created automatically based on the pod labels
Please check for service selector’s label. It should be match with the pod label.
I can see it’s not matching. Label is
name: simple-webapp instead of