I couldn't retrieve pod logs by using the command kubectl logs (podname). I'm getting the below error instead of pod logs
Error from server: Get https://10.x.x.x:10250/containerLogs/default/demo-deploy-sample-6fd5988db5-4csd8/demo-container: proxyconnect tcp: tls: first record does not look like a TLS handshake.
Little backgroud of my kubernetes cluster: Kubernetes master and worker nodes are running on centos 7 servers which is working behind the proxy and its working perfectly until I added four more new servers as kube slaves.Im able to retrieve kubectl logs for the pods which is running on old servers and its failed to retrieve logs from newly added servers only.
I have added proxy setup in /etc/environment file and docker.service
file as well. Firewall is disabled for all the kubernetes master and worker nodes.
Proxy in docker.service
file
Environment="HTTP_PROXY=http://x.x.x.x:8080/"
Environment="HTTPS_PROXY=http://x.x.x.x:8080/"
Environment="NO_PROXY=127.0.0.1,0.0.0.0,x.x.x.x"
Version info
- Client: v1.18.5
- Server: v1.18.5
- Docker: v19.03.12