I have created a pod and service for nginx in a cloud compute VM and with port forward I am able to forward the service to local port, which I am able to access it on browser as http://vm_ip:port.
The result - The page is displayed.
Now I have created an ingress with TLS enabled and mapped the minikube ip with backend dns name for e.g backend.minikube.local. I enabled the TLS using self signed certificate.
I tested the response using curl in VM and I get the result for https (output of result below)
#curl --cacert tls.crt https://backend.minikube.local
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
Now, how can I view the same from browser from my desktop? I tried to port forward ingress but it fails -
kubectl port-forward --address 0.0.0.0 ingress/nginx 8080:80
error: cannot attach to *v1.Ingress: selector for *v1.Ingress not implemented
Do port-forward only works for pods, service and deployment? not for reverse-proxy?
Please share the solution or insight if anyone able to make it work on browswer.
Thanks.