<p>I have a deamonset which defines</p>

<pre><code>ports:
- containerPort: 24231
</code></pre>

<p>in spec.</p>

<p>After deploying a set I can curl <code>/metrics</code> endpoint on localhost(in container) and can curl the endpoint of one container from another container of the same set.</p>

<p>Then I define a service like this:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: fluentd
  labels:
    app: fluentd
spec:
  ports:
    - name: prometheus
      port: 80
      targetPort: 24231
  selector:
    app: fluentd
</code></pre>

<p>I expect that this will allow me to:
<code>kubectl proxy --port=8001</code></p>

<p>And after following the link:
<code>http://127.0.0.1:8001/api/v1/namespaces/default/services/fluentd:prometheus/proxy/metrics</code></p>

<p>What I see is this:</p>

<pre><code>Error: 'dial tcp 10.136.4.30:24231: i/o timeout'
Trying to reach: 'http://10.136.4.30:24231/metrics'
</code></pre>

<p>But <code>http://127.0.0.1:8001/api/v1/namespaces/default/services/fluentd</code> returns me service information as expected which includes:</p>

<pre><code>"spec": {
    "ports": [
      {
        "name": "prometheus",
        "protocol": "TCP",
        "port": 80,
        "targetPort": 24231
</code></pre>

<p>What am I doing wrong. This service has worked a week ago, but stopped working after redeployment.</p>

user3081519
<p>This was a GKE issue that I had to resolve with their support. </p>
