Certified Kubernetes Application Developer (CKAD) · Section 5 · 20% of the exam
Use Ingress rules to expose applications
One of the objectives of the Certified Kubernetes Application Developer (CKAD) exam, in the section “Services and Networking”. Here is what it covers, the points to remember and a question to try.
What it covers
Ingress routes external HTTP and HTTPS traffic to Services by host and path. This lesson covers the Ingress object, controllers and IngressClass, pathType rules, TLS, default backends, kubectl create ingress, troubleshooting, and where Gateway API fits.
Points to remember
- Ingress routes HTTP(S) by host and path to Services; it needs an Ingress controller to take effect.
ingressClassNameselects the IngressClass; the default class carriesingressclass.kubernetes.io/is-default-class: "true".- Every path needs
pathType: Exact, Prefix or ImplementationSpecific. - Prefix matches element by element on
/and ignores a trailing slash;/foodoes not match/foobar. - Longest matching path wins; on a tie Exact beats Prefix.
Try a question
A cluster has two IngressClasses, traefik and haproxy, and both carry the annotation ingressclass.kubernetes.io/is-default-class: "true". A developer applies an Ingress without ingressClassName. What happens?
- AThe class that sorts first alphabetically is selected, and the Ingress is served by it
- BThe API server rejects the new Ingress because two defaults are ambiguous
- CBoth controllers serve the Ingress
- DThe Ingress is created but ignored forever
Show the answer
B. At most one IngressClass should be marked default. Fix it by removing the annotation from one class, or set ingressClassName explicitly on the Ingress.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Ingress: Exposing HTTP Applications teaches this objective (about 40 minutes), and 16 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.