minikube ingress remote access

10/13/2021

I have a Nginx service running in the minikuve VM having 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>

I want to expose the port 192.168.99.106:80 to the outside world so that the I will be able to access the app from 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 

Is it possible to achieve this functionality. I tried tunneling but could not make it work

-- Ajoy Das
kubernetes
minikube

1 Answer

10/14/2021

I sorted it out by using a reverse proxy nginx to the minikube ip.

-- Ajoy Das
Source: StackOverflow