kubernetes: service not reachable though pod healthy

9/4/2019

I have the following Service

➢  k get svc faros-web -o yaml
apiVersion: v1
kind: Service
metadata:
  name: faros-web
  namespace: mynamespace
  clusterIP: 10.8.49.178
  ports:
  - name: http
    port: 5000
    protocol: TCP
    targetPort: 5000
  selector:
    app: faros-web-primary
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}

Here is the pod corresponding to the Service's selector:

faros-web-primary-5b5c4f9475-j9tn6    2/2     Running     5          16m

k get pod faros-web-primary-5b5c4f9475-j9tn6 -o yaml | grep -i label -C 2

  labels:
    app: faros-web-primary

However from another pod in the same namespace:

user@faros-worker-5ddfd69c64-wnh2f:~/app$ curl http://faros-web:5000
upstream connect error or disconnect/reset before headers. reset reason: connection termination
user@faros-worker-5ddfd69c64-wnh2f:~/app$
user@faros-worker-5ddfd69c64-wnh2f:~/app$ curl http://faros-web
upstream connect error or disconnect/reset before headers. reset reason: connection failure

Using k8s 1.12 on GKE and istio 1.1.14

-- pkaramol
istio
kubernetes

0 Answers