KCNA practice question 16 of 25

What is an advantage of using the Gateway API compared to Ingress in Kubernetes?

Full set: 240 questions
Answer options
A: To automatically scale workloads based on CPU and memory utilization.
B: To provide clearer role separation between infrastructure providers and application developers. Correct answer
C: To configure routing rules through annotations directly on Ingress resources.
D: To expose an application externally by creating only a Service resource.
Correct Answer:
B. To provide clearer role separation between infrastructure providers and application developers.
Explanation

The Gateway API is designed with a role-oriented structure that separates responsibilities. It defines distinct resource types for different roles: GatewayClass (for infrastructure providers), Gateway (for cluster operators), and HTTPRoute (for application developers). This model allows infrastructure teams to manage how traffic enters the cluster, while application teams can safely manage routing for their specific services without interfering with each other or needing cluster-wide permissions. This clear separation is a significant advantage over the more monolithic Ingress API.

Why Incorrect

A. Autoscaling is handled by the Horizontal Pod Autoscaler (HPA) and is not a primary function of either Ingress or the Gateway API.
C. Configuring routing via annotations is a characteristic of the Ingress API, which the Gateway API aims to replace with strongly-typed, dedicated resources.
D. Exposing an application can be done with a Service (e.g., type LoadBalancer), but this is separate from the advanced L7 routing provided by Ingress or Gateway API.

References

1. Kubernetes Gateway API Documentation, "Concepts - Roles and Personas". Explains the three primary roles: Infrastructure Provider, Cluster Operator, and Application Developer, and how the API resources map to them. (gateway-api.sigs.k8s.io/concepts/roles-and-personas/)

2. Kubernetes Blog, "Evolving Kubernetes networking with the Gateway API". States, "Gateway API has a concept of 'role-oriented' design. The API resources model the separation of responsibilities common in managing networking." (kubernetes.io/blog/2021/04/22/evolving-kubernetes-networking-with-the-gateway-api/)

3. The Linux Foundation, Cloud Native Computing Foundation (CNCF), "Gateway API". Highlights that the API is "Role-oriented - It is designed for multiple roles that use and configure the API resources." (gateway-api.sigs.k8s.io/)

Scroll to Top