Traefik not routing at all

Hi!

Urgent as my production servers are down.

I was forced to upgrade kubernetes due to aws hardware failure and using kops — so here is my issue:

It seem that the upgrade deprecated the old way of doing things:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: docker-example-ingress
  namespace: webinc
  annotations:
    kubernetes.io/ingress.class: traefik
spec:
  rules:
    - host: example.com
      http:
        paths:
          - path: /
            backend:
              serviceName: webinc-myapp-service
              servicePort: registry

I've attempted to upgrade, but it's not working. I realize now we have to actually specify port numbers, which used to live in the service itself.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: docker-example-ingress
  namespace: webinc
  annotations:
    kubernetes.io/ingress.class: traefik
spec:
  rules:
    - host: example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: webinc-myapp-service
                port: 
                  number: 5000

Is there something else I need to do, perhaps re-install traefik or load something do with with the traefik annotations or ingress class?

UPDATE: I solved the issue.

Backstory in case this helps anyone:

  • AWS had hardware failture — I had to use kops to update cluster
  • kops said k8s version was deprecated, had to upgrade
  • the new k8s version deprecated the style in which traefik and ingress was implemented

So after I deleted traefik namespace, and reinstalled it from scratch (:sweat_smile:) — everything went back to normal.

But dayum that was a scary, happy 4th of July!