I created a service and worked normally.
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
dep1 NodePort 10.103.195.250 5006:31362/TCP 3d23h
I tried ingress as:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myapp-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
rules:
- host: mybokehapp.com
http:
paths:
- path: /app
pathType: Prefix
backend:
service:
name: dep1
port:
number: 5006
kubectl get ingress myapp-ingress
NAME CLASS HOSTS ADDRESS PORTS AGE
myapp-ingress nginx mybokehapp.com localhost 80 20h
–
I added to /etc/hosts:
192.168.49.2 mybokehapp.com – it comes from minikube ip.
then
curl http://mybokehapp.com. gives 404 Not Found
What might I be missing ?
kind regards