Challenge - 5 Problems
Ingress Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Output of kubectl get ingress command
Given this Ingress YAML, what will be the output of
kubectl get ingress my-ingress?Kubernetes
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
spec:
rules:
- host: example.com
http:
paths:
- path: /app
pathType: Prefix
backend:
service:
name: app-service
port:
number: 80Attempts:
2 left
💡 Hint
Look carefully at the columns shown by kubectl get ingress and the ports defined.
✗ Incorrect
The default output of 'kubectl get ingress' includes columns NAME, CLASS, HOSTS, ADDRESS, PORTS, and AGE. Since the Ingress defines port 80, PORTS shows 80. CLASS is usually if no ingressClass is specified.
❓ Configuration
intermediate2:00remaining
Correct Ingress pathType usage
Which Ingress resource snippet correctly uses
pathType to match all paths starting with /api?Attempts:
2 left
💡 Hint
Prefix matches all paths starting with the given prefix exactly as written.
✗ Incorrect
Using pathType: Prefix with path /api matches all requests starting with /api, such as /api/users. Exact matches only /api exactly. ImplementationSpecific behavior varies by ingress controller. Using wildcards like * in path is invalid.
❓ Troubleshoot
advanced2:00remaining
Ingress not routing to service
You created this Ingress but requests to
http://example.com/app return 404. What is the most likely cause?Kubernetes
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: test-ingress
spec:
rules:
- host: example.com
http:
paths:
- path: /app
pathType: Exact
backend:
service:
name: app-service
port:
number: 80Attempts:
2 left
💡 Hint
Check how pathType Exact matches request paths.
✗ Incorrect
pathType Exact matches only the exact path /app. Requests like /app/ or /app/page will not match and return 404. Using pathType Prefix would match all paths starting with /app.
🧠 Conceptual
advanced2:00remaining
Understanding Ingress TLS configuration
Which statement about TLS configuration in a Kubernetes Ingress resource is correct?
Attempts:
2 left
💡 Hint
Think about what the TLS section defines and what it requires.
✗ Incorrect
The TLS section in an Ingress specifies the secret holding the TLS certificate and private key, and the hosts for which TLS applies. It does not automatically redirect HTTP to HTTPS; that requires additional configuration.
✅ Best Practice
expert2:00remaining
Best practice for Ingress resource annotations
Which annotation is recommended to enable automatic HTTPS redirect in NGINX Ingress Controller?
Attempts:
2 left
💡 Hint
Look for the annotation that controls SSL redirect behavior.
✗ Incorrect
The annotation 'nginx.ingress.kubernetes.io/ssl-redirect: "true"' enables automatic redirect from HTTP to HTTPS in the NGINX Ingress Controller. Other annotations control different behaviors.