Minikube: regression: ingress rewrite not working in v0.25

Created on 31 Jan 2018  路  9Comments  路  Source: kubernetes/minikube

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Please provide the following details:

Environment:

Minikube version (use minikube version): v0.25.0

  • OS (e.g. from /etc/os-release): Windows 10 Pro 1709
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): hyperv
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): file://C:/Users/*/.minikube/cache/iso/minikube-v0.25.1.iso
  • Install tools:
  • Others:

What happened:

Following along with https://medium.com/@Oskarr3/setting-up-ingress-on-minikube-6ae825e98f82. At the end, http://cheese.all/cheddar and http://cheese.all/stilton give 404 errors.

What you expected to happen:

http://cheese.all/cheddar and http://cheese.all/stilton should be 200 OK.

How to reproduce it (as minimally and precisely as possible):

  1. kubectl run stilton-cheese --image=errm/cheese:stilton --port=80
  2. kubectl expose deployment stilton-cheese --type=NodePort

    • Confirm the above two worked with minikube service stilton-cheese

  3. minikube addons enable ingress
  4. kubectl create -f https://gist.githubusercontent.com/0sc/77d8925cc378c9a6a92890e7c08937ca/raw/02d23dc349718792a0d19defb3af932a38283905/ingress-tutorial.yaml
  5. echo "$(minikube ip) cheeses.all" | sudo tee -a /etc/hosts
  6. Open a web browser, navigate to http://cheeses.all/cheddar and see a 404

Output of minikube logs (if applicable):

Anything else do we need to know:

v0.24.1 works correctly. I am _very_ new to kubernetes, so it could be a simple change in ingress that I am not aware of.

kinbug lifecyclstale

Most helpful comment

@mlschneid I've found at least 2 variations on what the annotation is supposed to be - try specifying both of the following...

ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/rewrite-target: /

All 9 comments

I'm experiencing similar issues. I just upgraded from k8s 1.8 to 1.9 via minikube v0.25.0 and ingress rules that worked before are no longer working

@mlschneid I've found at least 2 variations on what the annotation is supposed to be - try specifying both of the following...

ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/rewrite-target: /

I have the same Issue with minikube 0.25 and Kubernetes 1.9.0

@mellowplace Thanks, nginx.ingress.kubernetes.io/rewrite-target: / solved it for me.

@mellowplace I'll try that out this weekend and report back.

@mycrEEpy I had the same problem with Kubernetes 1.9 using weavenet. I switched to flannel and the problem went away. Not sure what minikube uses under the hood.

Thanks... This resolves the issue for 1.9

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

/close

Was this page helpful?
0 / 5 - 0 ratings