Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kubectl: net/http: TLS handshake timeout

I followed the Quickstart docs (here) to deploy a k8s cluster in the Western Europe region. The cluster boots up fine, but I cannot connect to it using kubectl - kubectl times out while trying to perform a TLS handshake:

Unable to connect to the server: net/http: TLS handshake timeout

There is currently a github issue where others are reporting the same problem.

Following some advice on the thread, I attempted to perform an upgrade from 1.8.1 to 1.8.2, which failed:

bash-4.3# az aks upgrade --resource-group=k8s --name=phlo -k 1.8.2
Kubernetes may be unavailable during cluster upgrades.
Are you sure you want to perform this operation? (y/n): y
 / Running ..
Deployment failed. Correlation ID: <redacted>. Operation failed with status: 200. Details: Resource state Failed

According to others on the github thread, it seems to be a region-specific issue.

like image 761
John Hamelink Avatar asked Aug 22 '26 01:08

John Hamelink


1 Answers

The solution to this one for me was to scale the nodes in my Cluster from the Azure Kubernetes service blade web console.

Workaround / Solution

An interesting solution (worked for me!) to test...

  1. Log into the Azure Console — Kubernetes Service blade.
  2. Scale your cluster up by 1 node.
  3. Wait for scale to complete and attempt to connect (you should be able to).
  4. Scale your cluster back down to the normal size to avoid cost increases.

Total time it took me ~2 mins.

More Background Info on the Issue

Added this to the full ticket description write up that I posted over here (if you want more info have a read):

'Unable to connect Net/http: TLS handshake timeout' — Why can't Kubectl connect to Azure AKS server?

like image 178
Necevil Avatar answered Aug 23 '26 23:08

Necevil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!