我按照快速入门文档 ( here ) 在西欧区域部署了一个 k8s 集群。集群启动正常,但我无法使用 kubectl 连接到它 - kubectl 在尝试执行 TLS 握手时超时:
Unable to connect to the server: net/http: TLS handshake timeout
There is currently a github issue where others are reporting the same problem.
按照线程上的一些建议,我尝试执行从 1.8.1 到 1.8.2 的升级,但失败了:
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
根据 github 线程上的其他人的说法,这似乎是一个特定于区域的问题。
最佳答案
对我来说,这个问题的解决方案是从 Azure Kubernetes 服务 Blade Web 控制台扩展集群中的节点。
解决方法/解决方案
一个有趣的解决方案(对我有用!)来测试......
- 登录 Azure 控制台 - Kubernetes 服务 Blade 。
- 将集群扩展 1 个节点。
- 等待缩放完成并尝试连接(您应该能够)。
- 将集群缩小至正常大小以避免成本增加。
我总共花了大约 2 分钟的时间。
有关该问题的更多背景信息
将此添加到我在此处发布的完整票证描述中(如果您想了解更多信息,请阅读):
'Unable to connect Net/http: TLS handshake timeout' — Why can't Kubectl connect to Azure AKS server?
关于azure - kubectl : net/http: TLS handshake timeout,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48167471/