Minikube配置正确,但是无法访问仪表板-Kubernetes

时间:2018-12-26 20:10:13

标签: kubernetes

我是Kubernetes的新手,我最近使用以下命令将其安装在Linux机器(Mint 19版本Tara)中:

#install kubectl
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && sudo cp kubectl /usr/local/bin/ && rm kubectl

# in case you don't have virtual box, go and install it with the following commands
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

sudo apt-get update
sudo apt-get install virtualbox

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

# start minikube
minikube start

minikube的状态表明配置正确:

minikube status

host: Running
kubelet: Running
apiserver: Running
kubectl: Correctly Configured:

kubectl cluster-info

Kubernetes master is running at https://192.168.99.100:8443
KubeDNS is running at https://192.168.99.100:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

ping 192.168.99.100

PING 192.168.99.100 (192.168.99.100) 56(84) bytes of data.
64 bytes from 192.168.99.100: icmp_seq=1 ttl=64 time=0.876 ms
64 bytes from 192.168.99.100: icmp_seq=2 ttl=64 time=1.01 ms
64 bytes from 192.168.99.100: icmp_seq=3 ttl=64 time=1.36 ms
64 bytes from 192.168.99.100: icmp_seq=4 ttl=64 time=1.03 ms

但是当我尝试访问192.168.99.100:30000(仪表板)或192.168.99.100:8443时,我收到无效的http响应。

我错过了正确设置Kubernetes的任何步骤吗?

更新

我应用了minikube deleteminikube start,现在在显示中出现了另一个错误:

enter image description here

1 个答案:

答案 0 :(得分:1)

您可以从本地主机而不是其他主机访问端口30000。尝试在minikube VM上运行:

minikube dashboard

它将重定向到仪表板页面。