问题描述
使用以下命令启动群集仪表板时出现超时问题
microk8s dashboard-proxy
这个问题在我的kubernate集群中一次又一次地发生。我真的不知道原因。
error: timed out waiting for the condition on deployments/kubernetes-dashboard
Traceback (most recent call last):
File "/snap/microk8s/1609/scripts/wrappers/dashboard-proxy.py",line 50,in <module>
dashboard_proxy()
File "/snap/microk8s/1609/scripts/wrappers/dashboard-proxy.py",line 13,in dashboard_proxy
check_output(command)
File "/snap/microk8s/1609/usr/lib/python3.5/subprocess.py",line 626,in check_output
**kwargs).stdout
File "/snap/microk8s/1609/usr/lib/python3.5/subprocess.py",line 708,in run
output=stdout,stderr=stderr)
subprocess.CalledProcessError: Command '['microk8s.kubectl','-n','kube-system','wait','--timeout=240s','deployment','kubernetes-dashboard','--for','condition=available']' returned non-zero exit status 1
解决方法
我正在使用microk8s在无业游民的机器(Centos)上运行kubernate集群。此问题可能是由许多原因引起的。贝娄是其中的一些;
- 内存泄漏
- 在安装microk8s时出了点问题
要修复:纯microk8s并重新安装。就我而言,我使用snap来安装它。这就是我的做法
snap remove microk8s --purge
snap install microk8s --classic --channel=1.18/stable
-
有些时候,您需要终止进程并重新启动无所事事的计算机。就我而言
lsof -Pi:10443 where 10443 on which my dashboard is running kill -9 xxxx where xxxx is the PID retrieved from the previous command