<p>On kubernetes 1.5.2 all of sudden <strong>kubectl logs</strong> is showing error while other commands are working fine, so definitely there is no issue with cluster setup but possibly some sort of bug. Kindly advise if there is workaround to get the logs working.</p>

<pre><code>$ kubectl logs -f some-pod-name
</code></pre>

<p>Error is given below:</p>

<pre><code>**Error from server: Get https://Minion-1-IP:10250/containerLogs/default/some-pod-name-3851540691-b18vp/some-pod-name?follow=true: net/http: TLS handshake timeout**
</code></pre>

<p>Please help.</p>

<p>In short, for me, the problem is caused by misconfigured proxy.</p>

<p>I came across this very same symptom last week. After poking around for some time This <a href="https://github.com/kubernetes/kubeadm/issues/211" rel="nofollow noreferrer">ISSUE</a> showed up. </p>

<p>For me, It's because I initialized the cluster with </p>

<pre><code>HTTP_PROXY=http://10.196.109.214:8118 HTTPS_PROXY=http://10.196.109.214:8118 NO_PROXY=10.196.109.214,localhost,127.0.0.1 kubeadm init
</code></pre>

<p><code>10.196.109.214</code> is my master node and on which I set up an http proxy. The proxy settings are automatically written in kubernete manifists. NO_PROXY here does not include any worker nodes, so that cause everything works fine but I can't retrieve any log from workers.</p>

<p>I just hand edited the env part of <code>/etc/kubernetes/manifests/kube-*.yaml</code> and add worker nodes' ips:</p>

<pre><code>env:
- name: NO_PROXY
  value: 10.196.109.214,10.196.109.215,10.196.109.216,10.196.109.217,localhost,127.0.0.1
- name: HTTP_PROXY
  value: http://10.196.109.214:8118
- name: HTTPS_PROXY
  value: http://10.196.109.214:8118
</code></pre>

<p>Then find relative pods with <code>kubectl -n kube-system get pods</code> and delete them with <code>kubectl -n kube-system delete pod &lt;pod-name&gt;</code>, wait for them to be recreated by kubelet. Everything works fine now.</p>
