istio: Unable to access the Kubernetes apiserver when injecting the istio_proxy sidecar

When I inject the istio_proxy sidecar, my pod’s main container which needs to access the Kubernetes apiserver can’t reach it and receives socket errors:

fleet/svc/index/service/service.go:49: Failed to list *v1beta1.Ingress: Get https://10.0.0.1:443/apis/extensions/v1beta1/namespaces/fleet/ingresses?resourceVersion=0: dial tcp 10.0.0.1:443: getsockopt: connection refused

Here are some error logs from the istio_proxy sidecar:

[2017-11-08 13:06:45.064][15][warning][config] external/envoy/source/server/listener_manager_impl.cc:248] error adding listener: 'tcp_172.17.0.13_9999' has duplicate address '172.17.0.13:9999' as existing listener
[2017-11-08 13:06:45.064][15][warning][upstream] external/envoy/source/server/lds_subscription.cc:65] lds: fetch failure: error adding listener: 'tcp_172.17.0.13_9999' has duplicate address '172.17.0.13:9999' as existing listener

The istio version used are:

  • 0.2.10
  • 0.2.12

The Kubernetes version is 1.7.5

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 21 (4 by maintainers)

Commits related to this issue

Most upvoted comments

ohh okay @sterziev88. I haven’t got such problem yet and I also do have prometheus with istio and it works perfect. May be you can create an issue on istio regarding this, and may be someone can provide the solution.

@vaibhhavv Yes, I have istio-injection for that specific namespace and there are sidecars for all pods.

I resolve it as I added:

deployment: pod_annotations: proxy.istio.io/config: ‘{ “holdApplicationUntilProxyStarts”: true }’

@sterziev88, It should not give any error after that atleast. 😦 I would sugest you to try the Istio 1.21 with Kiali 1.79.0 and test if its the same case or not.

@GregHanson I am still receiving errors of type:

Failed to list *v1.ConfigMap: Get https://10.96.0.1:443/api/v1/namespaces/fleet/configmaps?resourceVersion=0: dial tcp 10.96.0.1:443: getsockopt: connection refused

with istio version 0.5.1.

Here is an example of the sidecar that was injected with istioctl kube-inject:

  - args:
    - proxy
    - sidecar
    - --configPath
    - /etc/istio/proxy
    - --binaryPath
    - /usr/local/bin/envoy
    - --serviceCluster
    - istio-proxy
    - --drainDuration
    - 2s
    - --parentShutdownDuration
    - 3s
    - --discoveryAddress
    - servicemesh-pilot.istio-system:15003
    - --discoveryRefreshDelay
    - 1s
    - --zipkinAddress
    - zipkin.fleet:9411
    - --connectTimeout
    - 1s
    - --statsdUdpAddress
    - servicemesh-mixer.istio-system:9125
    - --proxyAdminPort
    - "15000"
    - --controlPlaneAuthPolicy
    - NONE
    env:
    - name: POD_NAME
      valueFrom:
        fieldRef:
          apiVersion: v1
          fieldPath: metadata.name
    - name: POD_NAMESPACE
      valueFrom:
        fieldRef:
          apiVersion: v1
          fieldPath: metadata.namespace
    - name: INSTANCE_IP
      valueFrom:
        fieldRef:
          apiVersion: v1
          fieldPath: status.podIP
    image: docker.io/istio/proxy:0.5.1
    imagePullPolicy: IfNotPresent
    name: istio-proxy
    resources: {}
    securityContext:
      privileged: false
      readOnlyRootFilesystem: true
      runAsUser: 1337
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    - mountPath: /etc/istio/proxy
      name: istio-envoy
    - mountPath: /etc/certs/
      name: istio-certs
      readOnly: true
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: default-token-bkzwc
      readOnly: true