minikube入口远程访问



我有一个Nginx服务在minikuve虚拟机中运行,ip地址为192.168.99.106

kubectl get ingress 
`NAME              CLASS    HOSTS   ADDRESS          PORTS   AGE`
`ingress-service   <none>   *       192.168.99.106   80      153m`
kubectl describe ingress
Name:             ingress-service
Namespace:        default
Address:          192.168.99.106
Default backend:  default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
Rules:
Host        Path  Backends
----        ----  --------
*           
/                fe-cluster-ip-service:3000 (172.17.0.20:3000)
/login/       login-cluster-ip-service:9090 (172.17.0.18:9090)

Annotations:  kubernetes.io/ingress.class: nginx
Events:       <none>

我想将端口192.168.99.106:80暴露给外部世界,以便我将能够从10.105.230.34:8888访问应用程序

enp129s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
inet **10.105.230.34**  netmask 255.255.255.0  broadcast 10.105.230.255
inet6 fe80::2be:75ff:fee1:57ce  prefixlen 64  scopeid 0x20<link>
ether 00:be:75:e1:57:ce  txqueuelen 1000  (Ethernet)
RX packets 3441670  bytes 4623846194 (4.3 GiB)
RX errors 0  dropped 38  overruns 0  frame 0
TX packets 971511  bytes 235934965 (225.0 MiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
device memory 0xfbc00000-fbcfffff 

是否有可能实现此功能。我试着挖隧道,但不能使它工作

我使用反向代理nginx对minikube ip进行了排序。

您需要访问service,而不是ingress

您可以在集群主机上运行以下命令:

kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard 8099:80 --address 0.0.0.0

然后可以访问::8099

相关内容

  • 没有找到相关文章

最新更新