【问题标题】:Why does "kubectl get nodes" time out?为什么“kubectl 获取节点”会超时?
【发布时间】:2021-04-04 06:57:00
【问题描述】:

我在跑步时已经为超时问题苦苦挣扎了几个小时
“kubectl 获取节点”或“kubectl 获取 pod”
我在本地机器上运行 minikube,没有同样返回错误。

【问题讨论】:

  • 请编辑您的帖子和答案 - 格式化文本,不要粘贴屏幕截图。
  • 好的。谢谢。我已经做到了。

标签: kubernetes kubectl minikube


【解决方案1】:

显然问题是我在清理容器时删除了 docker 容器。 我所要做的就是运行“minikube start”,它会重新创建所有内容。 现在一切正常

(base) libracoder@arete:~$ minikube start
?  minikube v1.16.0 on Ubuntu 20.04
✨  Using the docker driver based on existing profile
?  Starting control plane node minikube in cluster minikube
?  Restarting existing docker container for "minikube" ...

?  Docker is nearly out of disk space, which may cause deployments to fail! (91% of capacity)
?  Suggestion: 

    Try at least one of the following to free up space on the device:
    
    1. Run "docker system prune" to remove unused docker data
    2. Increase the amount of memory allocated to Docker for Desktop via
    Docker icon > Preferences > Resources > Disk Image Size
    3. Run "minikube ssh -- docker system prune" if using the docker container runtime
?  Related issue: https://github.com/kubernetes/minikube/issues/9024

?  Preparing Kubernetes v1.20.0 on Docker 20.10.0 ...
?  Verifying Kubernetes components...
?  Verifying ingress addon...
?  Enabled addons: storage-provisioner, default-storageclass, ingress
?  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
(base) libracoder@arete:~$ kubectl get nodes
NAME       STATUS   ROLES                  AGE   VERSION
minikube   Ready    control-plane,master   9d    v1.20.0
(base) libracoder@arete:~$ kubectl get pods
NAME                                  READY   STATUS             RESTARTS   AGE
mongodb-deployment-6586d9cdd9-8rkxg   0/1     CrashLoopBackOff   89         19h
nodejs-deployment-77767cd597-hz5qc    1/1     Running            3          19h
(base) libracoder@arete:~$ 

【讨论】:

  • 您的答案也应该是纯文本粘贴(图像是额外的肉汁可选,但文本应该在那里)。搜索引擎不会在图像上找到魔法字符串(或者很容易和可靠地),因为它没有纯文本字符串。这样未来的搜索就会在互联网搜索引擎索引这些页面时找到我们的答案。
猜你喜欢
  • 2021-05-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-12-22
  • 2023-03-09
相关资源
最近更新 更多