简体   繁体   中英

How to expose a Minkube IP to the Host IP (Kubernetes/k8s)

How can I expose a Minikube Service IP to Host IP address?

Example: Minikube Service IP 192.168.49.2
在此处输入图像描述
Example: Minikube Pod IP 10.99.14.89 在此处输入图像描述
Example: Host IP 192.168.21.79
在此处输入图像描述

I found an easy way to conquer this issue. (1:expose Service 2:Expose pod)

Example 1: expose Service kubectl port-forward --address 0.0.0.0 service/app 8881:8888

在此处输入图像描述 在此处输入图像描述

Reference: Forward a local port to a port on the Pod

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM