我是kubernetes的新手。我已经在virtualbox VM (ubuntu 19.10)中安装了minikube v1.5.2。我想创建一个可以从主机和来宾访问的web服务器。但是,我不能访问它或暴露IP。你能帮我一下吗?
我已经启用了入口插件。
当我尝试列出入口对象时,没有外部IP,并且从入口控制器部署收到以下错误消息:
2019/11/10 15:41:04 controller-haproxy.go:147 service does not exists
2019/11/10 15:41:09 controller.go:333: service does not exists
2019/11/10 15:41:09 controller-haproxy.go:147 service does not exists
2019/11/10 15:41:14 controller.go:333: service does not exists
2019/11/10 15:41:14 controller-haproxy.go:147 service does not exists发布于 2019-11-12 15:36:51
Minikube介绍了通过minikube tunnel对LoadBalancer的支持。
当您不使用$ sudo minikube tunnel时,您的LB服务将一直处于pending状态。
您需要打开另一个SSH窗口并运行$ sudo minikube tunnel。您将在一个SSH中接收输出,如下所示:
$ sudo minikube tunnel
Status:
machine: minikube
pid: 11549
route: 10.96.0.0/12 -> 10.132.15.208
minikube: Running
services: [haproxy-ingress]
errors:
minikube: no errors
router: no errors
loadbalancer emulator: no errors在第二个SSH中,您将能够检查LB服务是否获得了IP地址。
minikube:~$ kubectl get svc -w
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
app ClusterIP 10.105.136.11 <none> 80/TCP 68s
haproxy-ingress LoadBalancer 10.111.24.111 <pending> 80:31187/TCP 68s
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 11d
haproxy-ingress LoadBalancer 10.111.24.111 10.111.24.111 80:31187/TCP 80s请记住,必须始终打开minikube tunnel会话,否则您的LB将停止获取IP地址。
您可以使用Kong using minikube LB检查类似的情况。
如果这对你有帮助,请告诉我。
https://stackoverflow.com/questions/58790433
复制相似问题