<p>I was debugging a issue from my cluster, seems <code>kubectl</code> commands timeout inside the kube-addon-manager pod, while the equivalent curl command works fine. </p>

<pre><code>bash-4.3# kubectl get node --v 10
I1119 16:35:55.506867      54 round_trippers.go:386] curl -k -v -XGET  -H "Accept: application/json, */*" -H "User-Agent: kubectl/v1.10.5 (linux/amd64) kubernetes/32ac1c9" http://localhost:8080/api
I1119 16:36:25.507550      54 round_trippers.go:405] GET http://localhost:8080/api  in 30000 milliseconds
I1119 16:36:25.507959      54 round_trippers.go:411] Response Headers:
I1119 16:36:25.508122      54 cached_discovery.go:124] skipped caching discovery info due to Get http://localhost:8080/api: dial tcp: i/o timeout
</code></pre>

<p>Equivalent curl command output</p>

<pre><code>bash-4.3# curl -k -v -XGET  -H "Accept: application/json, */*" -H "User-Agent: kubectl/v1.10.5 (linux/amd64) kubernetes/32ac1c9" http://localhost:8080/api
Note: Unnecessary use of -X or --request, GET is already inferred.
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
&gt; GET /api HTTP/1.1
&gt; Host: localhost:8080
&gt; Accept: application/json, */*
&gt; User-Agent: kubectl/v1.10.5 (linux/amd64) kubernetes/32ac1c9
&gt;
&lt; HTTP/1.1 200 OK
&lt; Content-Type: application/json
&lt; Date: Mon, 19 Nov 2018 16:43:00 GMT
&lt; Content-Length: 134
&lt;
{"kind":"APIVersions","versions":["v1"],"serverAddressByClientCIDRs":[{"clientCIDR":"0.0.0.0/0","serverAddress":"172.16.1.13:6443"}]}
* Connection #0 to host localhost left intact
</code></pre>

<p>Also tried to run a docker container with host network mode, kubectl command still timeout. </p>

<p><code>kube-addon-manager.yaml</code></p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: kube-addon-manager
  namespace: kube-system
  annotations:
    scheduler.alpha.kubernetes.io/critical-pod: ''
  labels:
    component: kube-addon-manager
spec:
  hostNetwork: true
  containers:
  - name: kube-addon-manager
    image: gcr.io/google-containers/kube-addon-manager:v8.6
    imagePullPolicy: IfNotPresent
    command:
    - /bin/bash
    - -c
    - /opt/kube-addons.sh
    resources:
      requests:
        cpu: 5m
        memory: 50Mi
    volumeMounts:
    - mountPath: /etc/kubernetes/
      name: addons
      readOnly: true
  volumes:
  - name: addons
    hostPath:
      path: /etc/kubernetes/
</code></pre>

flynn
<p>Seems like in your config you are trying to talk to port <code>8080</code> which is the insecure port in the kube-apiserver.</p>

<p>You can try starting your kube-apiserver with this option:</p>

<pre><code>--insecure-port
</code></pre>

<p>The default for the insecure port is <code>8080</code>. Note that this option might be deprecated in the future.</p>

<p>Also, keep in mind the the <code>kube-addon-manager</code> is part of the <a href="https://kubernetes.io/docs/concepts/cluster-administration/addons/#legacy-add-ons" rel="nofollow noreferrer">legacy add-ons</a>.</p>
