Bird
0
0

Given this Ingress rule snippet, what hostname will route traffic to my-service?

medium📝 Command Output Q13 of 15
Kubernetes - Ingress
Given this Ingress rule snippet, what hostname will route traffic to my-service?
spec:
  rules:
  - host: app.example.com
    http:
      paths:
      - path: /app
        pathType: Prefix
        backend:
          service:
            name: my-service
            port:
              number: 8080
Aapp.example.com
Bexample.com
Cmy-service
Dapp
Step-by-Step Solution
Solution:
  1. Step 1: Identify the host in the Ingress rule

    The host field is set to app.example.com, which defines the hostname for routing.
  2. Step 2: Understand routing based on host

    Traffic to app.example.com with path prefix /app routes to my-service on port 8080.
  3. Final Answer:

    app.example.com -> Option A
  4. Quick Check:

    Host in rule = app.example.com [OK]
Quick Trick: Look for host field in Ingress rules [OK]
Common Mistakes:
  • Confusing service name with hostname
  • Ignoring the host field and picking path or service name
  • Choosing partial strings like 'app' instead of full hostname

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes