在Mac M1上运行Minikube时,无法进入Kubernetes
我正在尝试使用Minikube(Docker Driver)在Mac上使用M1芯片运行本地群集。我在Minikube中启用了Ingress插件,我有一个单独的终端,在该终端中我正在运行Minikube隧道
,并启用了Minikube仪表板,我想使用Ingress公开。 这是我的配置文件:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: dashboard-ingress
namespace: kubernetes-dashboard
spec:
rules:
- host: dashboard.com
http:
paths:
- backend:
service:
name: kubernetes-dashboard
port:
number: 80
pathType: Prefix
path: /
我还将“ dashboard.com”放在我的/etc/hosts文件中,实际上是在正确的IP中,但是当我将“ http://dashboard.com”放在浏览器或当我尝试使用它时,我总是会收到超时。
注意:当我运行Minikube隧道
时,
❗ The service/ingress dashboard-ingress requires privileged ports to be exposed: [80 443]
I am trying to run a local cluster on Mac with M1 chip using Minikube (Docker driver). I enabled ingress addon in Minikube, I have a separate terminal in which I'm running minikube tunnel
and I enabled Minikube dashboard, which I want to expose using Ingress.
This is my configuration file:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: dashboard-ingress
namespace: kubernetes-dashboard
spec:
rules:
- host: dashboard.com
http:
paths:
- backend:
service:
name: kubernetes-dashboard
port:
number: 80
pathType: Prefix
path: /
I also put "dashboard.com" in my /etc/hosts file and it's actually resolving to the right IP, but it's not responding when I put "http://dashboard.com" in a browser or when I try to ping it and I always receive a timeout.
NOTE: when I run minikube tunnel
I get
❗ The service/ingress dashboard-ingress requires privileged ports to be exposed: [80 443]
???? sudo permission will be asked for it.
I insert my sudo password and then nothing gets printed afterwards. Not sure if this is is an issue or the expected behavior.
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我有相同的行为,显然
Minikube隧道
使用的是映射/etc/etts/hosts
中的“ 127.0.0.1”,而不是Minikube IP 或入口描述。
为我修复了
I had the same behavior, and apparently what's needed for
minikube tunnel
to work is to map "127.0.0.1" in/etc/hosts
, instead of the output fromminikube ip
or the ingress description.that fixed it for me
在Mac M1 上有类似的问题,Initiary尝试了插入式DNS,但随后实现了它可以启用其当前不起作用或使用Docker驱动程序 https://github.com/kubernetes/kubernetes/minikikube/7332#issuecomment-60813325
Intel 用户已经使用HyperKit驱动程序使IT可以正常工作,但是Mac m1 不可用,但
我现在的答案是使用Minikube隧道 https://minikube.sigs.k8s.io/docs/docs/handbook/Accessing/ ,并将入口处添加到/etc/etts/ett Hosts ,也必须使用-p参数EG传递群集名称:Minikube隧道-Cleanup -p< cluster_name>
had a similar issue on mac m1, initialy tried addon ingress-dns but then realised while it can be enabled its not currently working or supported using the docker driver https://github.com/kubernetes/minikube/issues/7332#issuecomment-608133325
some other mac intel users have got it working using hyperkit driver but thats not available for mac m1 yet
my answer for now is to use minikube tunnel https://minikube.sigs.k8s.io/docs/handbook/accessing/ and add entry to /etc/hosts for ingress, also have to pass in the cluster name using the -p parameter eg: minikube tunnel --cleanup -p <CLUSTER_NAME>