Back to questionsThe app listens on 8080 and declares no
JuniorTheoryVery common
The app listens on 8080 and declares no containerPort; on which Pod port does a call to web:80 arrive?
apiVersion: v1
kind: Service
metadata:
name: web
spec:
selector:
app: web
ports:
- port: 80
targetPort: 80808080
- Expecting the Service's
portto be the port the app must listen on - Thinking traffic cannot reach a container port that
containerPortdoes not list
- What is
targetPortwhen a Service leaves it out? - How does a named
targetPortsuch ashttpfind the right container port?