mismatch port
What’s the mismatch? In a service, port and targetPort are two different things:
-
port
refers to the port to use when accessing the service. So when you access the service, you access it (from the same namespace) asservice-3421-svcn:8080
. -
targetPort
is the containerPort of the target container in the pod the service links to. Which is 80 in this case.