如何通过 Minikube 在本地安装 Kubernetes

如何通过 Minikube 在本地安装 Kubernetes

为了了解有关 Kubernetes 的更多信息,我尝试安装一个独立实例。如果您尝试运行minikube终端?建议通过 snap 安装

sudo snap install minikube kubectl
  • snap info minikube

    Minikube 是一款可让您轻松在本地运行 Kubernetes 的工具。Minikube 在笔记本电脑上的虚拟机内运行单节点 Kubernetes 集群,适合希望试用 Kubernetes 或日常使用它进行开发的用户。

  • snap info kubectl

    kubectl 是一个针对 Kubernetes 运行命令的命令行界面

但这让我遇到了这个错误:

$ minikube start
There is a newer version of minikube available (v0.32.0).  Download it here:
https://github.com/kubernetes/minikube/releases/tag/v0.32.0
To disable this notification, add WantUpdateNotification: False to the json config file at /home/pablo/snap/minikube/4/.minikube/config
(you may have to create the file config.json in this folder if you have no previous configuration)
Starting local Kubernetes cluster...
E0113 21:27:07.861621   12532 start.go:83] Error starting host: Error creating new host: dial tcp: missing address. Retrying.
E0113 21:27:07.876969   12532 start.go:83] Error starting host: Error creating new host: dial tcp: missing address. Retrying.
E0113 21:27:07.892771   12532 start.go:83] Error starting host: Error creating new host: dial tcp: missing address. Retrying.
E0113 21:27:07.892806   12532 start.go:89] Error starting host:  Error creating new host: dial tcp: missing address
Error creating new host: dial tcp: missing address
Error creating new host: dial tcp: missing address

我试过:

  • 关于 Github 问题的几乎所有建议:27886792722942424
  • 正在安装(已存在)libvirt-bin( libvirt-clients libvirt-daemon)
  • sudo virsh -c qemu:///system net-start default

或许还没有准备好黄金时段

答案1

我终于找到了一个可行的解决方案,删除 snap 包(sudo snap remove minikube),然后按照以下方法之一官方指南保存kubectl

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
&& sudo install minikube-linux-amd64 /usr/local/bin/minikube

经过kubectl version测试

$ kubectl get nodes
NAME       STATUS   ROLES    AGE   VERSION
minikube   Ready    master   25m   v1.12.4

要运行仪表板

minikube dashboard

或者你可以尝试microk8s(附加组件、ARM、多节点)种类或者凯利. 您可能还感兴趣游牧民族

相关内容