拒绝与 Kubectl 连接

问题描述 投票:0回答:1

我是 Kubernetes 新手,我尝试使用 Google Cloud 运行一些应用程序,并试图了解它是如何工作的。

如果我跑步:

kubectl get all

我收到以下消息:

E0122 15:57:30.513429   81051 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
E0122 15:57:30.513775   81051 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
E0122 15:57:30.515365   81051 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
E0122 15:57:30.515969   81051 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
E0122 15:57:30.517691   81051 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
The connection to the server localhost:8080 was refused - did you specify the right host or port?

这是为什么?我希望有一个干净的 minikube 状态。我该如何清洁它?

我尝试使用

sudo
运行相同的命令,但得到了相同的结果。

kubernetes kubectl
1个回答
0
投票

这个问题指出了两个潜在的问题:

  1. 您的 minikube 实际上并未运行(检查 docker 是否正在运行)
  2. 确保您的
    kubeconfig
    文件在那里。通常,这是在
    ~/.kube/config

我希望这有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.