Bird
0
0

You deployed this Traefik Ingress YAML but traffic is not reaching your service. What is the most probable cause?

medium📝 Troubleshoot Q6 of 15
Kubernetes - Ingress
You deployed this Traefik Ingress YAML but traffic is not reaching your service. What is the most probable cause?
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: traefik-ingress
spec:
  rules:
  - host: app.example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: my-service
            port:
              number: 80
AMissing annotation 'kubernetes.io/ingress.class: traefik'
BIncorrect apiVersion for Ingress resource
CService port number is invalid
DHost field is not allowed in Ingress spec
Step-by-Step Solution
Solution:
  1. Step 1: Check for ingress class annotation

    Traefik requires the annotation 'kubernetes.io/ingress.class: traefik' to bind the Ingress resource.
  2. Step 2: Validate apiVersion

    ApiVersion 'networking.k8s.io/v1' is correct for Ingress.
  3. Step 3: Verify service port

    Port 80 is valid and correctly specified.
  4. Step 4: Confirm host usage

    Host is valid in Ingress rules.
  5. Final Answer:

    Missing annotation 'kubernetes.io/ingress.class: traefik' -> Option A
  6. Quick Check:

    Ingress class annotation required for Traefik [OK]
Quick Trick: Traefik needs ingress.class annotation to route traffic [OK]
Common Mistakes:
  • Omitting ingress class annotation
  • Assuming apiVersion is incorrect
  • Misconfiguring service port

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes