kubernetes 突然得到“无法连接到服务器:net/http:TLS handshake timeout”来自kubectl

hmtdttj4  于 2023-06-21  发布在  Kubernetes
关注(0)|答案(4)|浏览(288)

我的vanilla kubernetes集群运行在“Docker for Mac”上,在没有任何真实的负载的情况下运行良好。现在,我部署了一些服务和istio。现在,我得到了这个错误:

$ kubectl get pods --all-namespaces
Unable to connect to the server: net/http: TLS handshake timeout

在哪里可以看到kubectl日志?
Mac OS High Sierra感谢您阅读我的文章。

ivqmmu1c

ivqmmu1c1#

我将RAM增加到8GB,CPU增加到4,交换空间增加到4GB,重新启动Docker For Mac。kubectl现在运行良好。

camsedfj

camsedfj2#

我在运行Ubuntu服务器的两个节点集群上遇到了类似的问题。我的主节点系统时间设置为错误的时间和日期。这会导致TLS握手超时的问题。在设置正确的系统时间后,问题得到了解决。
/etc/init.d/ntp stop
ntpdate<ntpserver_IP>
谢谢

toiithl6

toiithl63#

要查看其他日志,您可以尝试“--v=N”选项,例如:

kubectl get pods --all-namespaces --v=9

参见https://kubernetes.io/docs/reference/kubectl/cheatsheet/#kubectl-output-verbosity-and-debugging

evrscar2

evrscar24#

在使用kubectl之前,你需要运行以下命令

unset http_proxy
unset https_proxy

相关问题