Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

nginx - Path wildcard not working in kubernetes ingress

I have installed Ingress and linked my service to it (usign metallb).

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
     nginx.ingress.kubernetes.io/rewrite-target: /
spec:
   rules:
   - http:
       paths:
       - path: /api/tasks/*
         # pathType: Exact
         backend:
           serviceName: tasks-service
           servicePort: 5004

The thing is this, I set up the default prefix of the paths in the deployment to be

/api/tasks/

where /api/tasks/tasks shows the service is up while /api/tasks/tasks_count gives the total number. However in my k8s cluster, I cannot redirect to the different paths within the service. What could be the problem?

question from:https://stackoverflow.com/questions/65861282/path-wildcard-not-working-in-kubernetes-ingress

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...