Welcome to the Linux Foundation Forum!

Exercise 7 - nginx update requires change to YAML

Hello,

This info may also help. The nginx folks had a breaking change 2 days ago:

https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.0.0

If you miss the ingressclass the controller gives you:

"Ignoring ingress because of error while validating ingress class" ingress="default/ingress-test" error="ingress does not contain a valid IngressClass"

So a quick fix is adding the annotation for the ingress class to your ingress.yaml Otherwise the whole ingress part of lab 7 will not work.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-test
  namespace: default
  annotations:
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:
  - host: www.example.com
    http:
      paths:
      - backend:
          service:
            name: secondapp
            port:
              number: 80
        path: /
        pathType: ImplementationSpecific
  - host: thirdpage.org
    http:
      paths:
      - backend:
          service:
            name: thirdpage
            port:
              number: 80
        path: /
        pathType: ImplementationSpecific

Comments

  • Thank you for the updates. I was wondering what happened to my ingress.yaml. Although I followed every step in the "Exercise 7.2: Service Mesh and Ingress Controller", I was still getting "404 Not Found". Adding the mentioned annotation has solved my problem.

Categories

Upcoming Training