Welcome to the Linux Foundation Forum!

Lab 11.2 "bad gateway" and the fix that worked for me

Options

When following the steps in Lab 11.2, all of a sudden at Step 11. after "adding an annotation to the ingress pods for Linkerd" my previously working Ingress started replying with "bad gateway" error messages. The downgrading approach didn't work for me. Instead, below are the steps that did work for me.

These steps are applicable to Linkerd version 2.13.0

student@cp:~$ linkerd version
Client version: stable-2.13.0
Server version: stable-2.13.0

The lab 11.2 exercise instructions use linkerd inject --ingress - to mesh the ingress pods. Whereas the Linked instructions for the ingress-nginx ingress describe a different approach that requires editing values.yaml in two places.
1. Setting kind: DaemonSet as per the lab instructions.
2. Setting podAnnotations which in my values.yaml looks like this:

  # -- Annotations to be added to controller pods
  ##
  podAnnotations:
    linkerd.io/inject: enabled

After making these edits to values.yaml and completing step 5.

student@cp: ̃/ingress-nginx$ helm install myingress .

The ingress controllers will both be up and running and meshed and visible in Linkerd.

Next at Step 7. when applying the ingress rules, I used this ingress.yaml config:

student@cp:~/ingress-nginx$ cat ingress.yaml 
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-test
  annotations:            
    nginx.ingress.kubernetes.io/service-upstream: "true"
  namespace: default
spec:
  ingressClassName: nginx
  rules:
  - host: www.external.com
    http:
      paths:
      - backend:
          service:
            name: web-one
            port:
              number: 80
        path: /
        pathType: ImplementationSpecific
status:
  loadBalancer: {}

The use of kubernetes.io/ingress.class: nginx is now deprecated so instead add the ingressClassName: nginx spec field as described in the ingress-nginx documentation.

The other change is nginx.ingress.kubernetes.io/service-upstream: "true" in the annotations.

I'm not certain if one or a combinations of the options gets Lab 11.2 working, but all together they worked for me.

Comments

  • stanleyathome
    Options

    Thanks for the notes, I stuck at the linkerd injection part as well. The curl cmd gives bad gateway error after the injection. I followed your instruction and made it through the lab without errors.

  • stanleyathome
    Options

    This can be a good opportunity for support to re-evaluate 11.2 lab guide as the current lab guide doesn't work.

  • proliant
    proliant Posts: 10
    Options

    I re-do the exercise and thanks a lot for the finding! madtechsupport

Categories

Upcoming Training