【问题标题】:kubernetes time-out after re-installation on macOS在 macOS 上重新安装后 kubernetes 超时
【发布时间】:2019-02-03 20:44:41
【问题描述】:

我在我的 Mac 上按照 https://kubernetes.io/docs/tasks/tools/install-kubectl/ 上的说明使用 brew 安装了 Kubernetes CLI。

brew install kubernetes-cli

kubectl 和 Minikube 已经安装了一段时间,所以我期待更新。现在 kubectl 版本和 kubernetes cluster-info 超时。

pa-demo jps$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-08T16:31:10Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
Unable to connect to the server: dial tcp 192.168.99.100:8443: i/o timeout

当我再次尝试安装 kubernetes-cli 时,我得到:

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core, homebrew/cask).
==> New Formulae
topgrade
==> Updated Formulae
bison ✔            azure-cli          bwfmetaedit        erlang@20          ghostscript        jfrog-cli-go       ldc                p11-kit            smlnj              youtube-dl
sphinx-doc ✔       babel              crystal            fauna-shell        helmfile           juju               mkvtoolnix         pyside             tarsnap-gui
alexjs             bat                doctl              fortio             influxdb           kore               nginx              re2c               thors-serializer

Warning: kubernetes-cli 1.11.2 is already installed and up-to-date
To reinstall 1.11.2, run `brew reinstall kubernetes-cli`

【问题讨论】:

  • 当您说“使用 brew 安装 Kubernetes”时,您需要更加具体。你到底安装了什么?迷你库?看起来像是 kubectl 无法连接到集群时发生的标准错误。
  • @GrantDavidBachman 我更新了问题

标签: kubernetes


【解决方案1】:

您可能已经安装了 Minikube,但这并不一定意味着它正在积极运行。您需要运行 minikube start 才能在您的机器上实际启动集群。这还会将您的 kubeconfig 文件配置为指向它构建的集群。

【讨论】:

  • 有趣,我没想到会通过连接到 Minikube 来验证 CLI 安装,因为新集群将在云中运行。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-05-11
  • 2020-12-04
  • 2015-10-01
  • 2020-07-06
  • 1970-01-01
  • 2022-11-04
相关资源
最近更新 更多