KCNA practice question 10 of 25

What is the role of the ingressClassName field in a Kubernetes Ingress resource?

Full set: 240 questions
Answer options
A: It defines the type of protocol (HTTP or HTTPS) that the Ingress Controller should process.
B: It specifies the backend Service used by the Ingress Controller to route external requests.
C: It determines how routing rules are prioritized when multiple Ingress objects are applied.
D: It indicates which Ingress Controller should implement the rules defined in the Ingress resource. Correct answer
Correct Answer:
D. It indicates which Ingress Controller should implement the rules defined in the Ingress resource.
Explanation

The ingressClassName field in a Kubernetes Ingress resource is used to specify which Ingress controller should be responsible for processing that Ingress. In a cluster that may have multiple Ingress controllers installed (e.g., for different teams, applications, or network requirements like internal vs. external), this field provides a direct and unambiguous way to associate an Ingress object with a specific controller implementation. The designated Ingress controller watches for Ingress resources with its name in the ingressClassName field and configures its underlying proxy (e.g., NGINX, HAProxy) accordingly to implement the specified routing rules.

Why Incorrect

A. Protocol handling (e.g., TLS termination for HTTPS) is configured within the tls section of the Ingress specification, not by ingressClassName.
B. The backend Service to which traffic is routed is defined within the rules or defaultBackend sections of the Ingress resource.
C. Routing priority is not a standard feature managed by this field; it is typically handled by controller-specific logic or annotations.

References

1. Kubernetes Documentation. (n.d.). Ingress. Kubernetes. Retrieved from https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class. (This section explicitly defines the purpose of the ingressClassName field).

2. Kubernetes Blog. (2020, October 8). IngressClass graduates to GA. Retrieved from https://kubernetes.io/blog/2020/10/08/ingressclass-graduates-to-ga/. (This article details the evolution and purpose of the IngressClass resource and the ingressClassName field).

3. The Linux Foundation. (2021). KCNA: Kubernetes and Cloud Native Associate Study Guide. (Domain 2: Kubernetes Fundamentals, Objective 2.4: Understand Kubernetes Networking).

Scroll to Top