InterviewSolution
Saved Bookmarks
| 1. |
How do you tie service to a pod or to a set of pods? |
|
Answer» By declaring pods with the label(s) and by having a selector in the service which acts as a glue to STICK the service to the pods. kind: Service apiVersion: v1 metadata: name: my-service SPEC: selector: app: MyApp ports: - PROTOCOL: TCP PORT: 80Let's say if we have a set of Pods that CARRY a label "app=MyApp" the service will start routing to those pods. |
|