Im triying to access a microservice inside minikube with ingress so I can access it by the service name, I’m working on windows and I was trying to find info online but nothing is working, so I’m stuck.
Next are the details of minikube and kubectl: minikube version: v1.32.0
Kubectl Version Client Version: v1.27.2 Kustomize Version: v5.0.1 Server Version: v1.28.3
Here are the result s of some commands:
kubectl get all -n ingress-nginx
NAME READY STATUS RESTARTS AGE
pod/ingress-nginx-admission-create-5sf8f 0/1 Completed 0 19m
pod/ingress-nginx-admission-patch-clmb9 0/1 Completed 1 19m
pod/ingress-nginx-controller-7c6974c4d8-5lxqw 1/1 Running 0 19m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/ingress-nginx-controller NodePort 10.103.93.247 <none> 80:32402/TCP,443:30401/TCP 19m service/ingress-nginx-controller-admission ClusterIP 10.96.225.12 <none> 443/TCP 19m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/ingress-nginx-controller 1/1 1 1 19m
NAME DESIRED CURRENT READY AGE
replicaset.apps/ingress-nginx-controller-7c6974c4d8 1 1 1 19m
NAME COMPLETIONS DURATION AGE
job.batch/ingress-nginx-admission-create 1/1 49s 19m
job.batch/ingress-nginx-admission-patch 1/1 50s 19m
minikube tunnel --profile polar
Tunnel successfully started
NOTE: Please do not close this terminal as this process must stay alive for the tunnel to be accessible …
! Access to ports below 1024 may fail on Windows with OpenSSH clients older than v8.1. For more information, see: https://minikube.sigs.k8s.io/docs/handbook/accessing/#access-to-ports-1024-on-windows-requires-root-permission
Starting tunnel for service polar-ingress.
After that hitting http://127.0.0.1/books return: Access to 127.0.0.1 was denied You don’t have authorization to view this page. HTTP ERROR 403
kubectl get all
NAME READY STATUS RESTARTS AGE
pod/edge-service-58b864b7df-4bsgz 1/1 Running 0 6m4s
pod/polar-postgres-869f658c86-4ssrn 1/1 Running 0 14m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/edge-service ClusterIP 10.102.116.70 <none> 80/TCP 6m3s
service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 15h
service/polar-postgres ClusterIP 10.106.121.205 <none> 5432/TCP 14m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/edge-service 1/1 1 1 6m4s deployment.apps/polar-postgres 1/1 1 1 14m
NAME DESIRED CURRENT READY AGE
replicaset.apps/edge-service-58b864b7df 1 1 1 6m4s replicaset.apps/polar-postgres-869f658c86 1 1 1 14m
minikube service --profile polar edge-service --url
service default/edge-service has no node port http://127.0.0.1:60607 ! Because you are using a Docker driver on windows, the terminal needs to be open to run it.
Hitting http://127.0.0.1:60607/ gives me: Whitelabel Error Page This application has no configured error view, so you are seeing this as a fallback. Sat Mar 09 17:19:05 UTC 2024 [24c9812b-7] There was an unexpected error (type=Not Found, status=404).
hitting http://127.0.0.1:60607/books gives me: http://127.0.0.1:60607 gives me: Access to 127.0.0.1 was denied You don’t have authorization to view this page. HTTP ERROR 403
Lastly I tried minikube --profile polar service edge-service
|-----------|--------------|-------------|--------------|
NAMESPACE NAME TARGET PORT URL
default edge-service No node port
----------- -------------- ------------- --------------
service default/edge-service has no node port
Starting tunnel for service edge-service.
|-----------|--------------|-------------|------------------------| | NAMESPACE | NAME | TARGET PORT | URL | |-----------|--------------|-------------|------------------------| | default | edge-service | | http://127.0.0.1:63078 |
|-----------|--------------|-------------|------------------------|
Opening service default/edge-service in default browser… ! Because you are using a Docker driver on windows, the terminal needs to be open to run it.
But nothing is working, I expect that you can help me.
Thanks.