Day 47 - Kubernetes Gateway API Tutorial For Beginners | Ingress vs Gateway API
About this video
### Comprehensive Final Summary In Day 47 of the CK 2025 series, Piyush provides an in-depth exploration of the **Gateway API**, a modern and extensible alternative to Kubernetes Ingress. The session is structured to include theoretical explanations, a hands-on demo, and an assignment with solutions available on GitHub. Below is a consolidated summary of the key takeaways from the session: --- #### **Introduction & Context** Piyush introduces the Gateway API as a more advanced and flexible solution compared to Kubernetes Ingress. This video focuses on its capabilities, architecture, and practical implementation through a live demo. Viewers are encouraged to refer to Day 33 of the series for foundational knowledge on Ingress if they are unfamiliar with it. --- #### **Gateway API Overview** - **Difference from Ingress**: The Gateway API extends beyond Ingress by supporting multiple protocols (HTTP, HTTPS, TCP, UDP) and advanced routing mechanisms (header-based, query-based, method-based). It also includes built-in features like canary rollouts. - **Custom Resource Definitions (CRDs)**: Unlike Ingress, which is native to Kubernetes, the Gateway API leverages CRDs, enabling greater extensibility and customization. --- #### **Key Features** 1. **Advanced Routing**: Supports diverse protocols and sophisticated routing rules based on headers, queries, and methods. 2. **Traffic Splitting**: Facilitates canary deployments by splitting traffic between different versions of an application. 3. **Standardization**: Eliminates vendor-specific annotations, ensuring configurations are portable across providers like Kong and NGINX. --- #### **Architecture** The Gateway API adopts a layered approach with three primary components: 1. **Gateway Class**: Defines the load balancing implementation (managed by infrastructure teams). 2. **Gateway**: Represents the actual load balancer instance (handled by cluster operators). 3. **HTTPRoute**: Specifies routing logic (managed by developers). This separation of concerns allows different teams to collaborate effectively, with each team responsible for specific components. --- #### **Demo Outline** The hands-on demo walks viewers through the following steps: 1. **CRD Installation**: Install the necessary CRDs for Gateway API (GatewayClass, Gateway, HTTPRoute). 2. **NGINX Gateway Setup**: Deploy the NGINX Gateway Fabric, including its CRDs and dependent resources. 3. **Service Configuration**: Adjust service ports to align with the sandbox environment. 4. **Gateway Resource Creation**: Define a Gateway resource with listeners and configure routing rules via HTTPRoute. --- #### **Hands-On Tasks** Viewers are guided through practical tasks, including: - Installing Gateway API CRDs and NGINX Gateway Fabric. - Deploying a sample application and configuring the Gateway resource to route traffic using HTTPRoute settings. - Validating the setup to ensure functionality. --- #### **Troubleshooting Insights** During the demo, several challenges arise, highlighting the complexities of live troubleshooting: - **Initial Issues**: Missing namespace specifications and incorrect backend service references in the HTTPRoute configuration prevent the Gateway from functioning correctly. - **Iterative Fixes**: Corrections include aligning namespaces, ensuring accurate backend service names, and matching port configurations between services and routes. - **Resolution**: After meticulous adjustments—such as adding optional "sectionName" fields and carefully matching parent references—the service becomes accessible on port 30080. This underscores the importance of adhering to documentation and considering propagation delays. --- #### **Resources** All commands, YAML files, and task details are provided in the GitHub repository under the Day 47 folder, enabling viewers to replicate and experiment with the setup. --- #### **Conclusion** The session emphasizes the Gateway API's role as a powerful tool for managing Kubernetes traffic, offering advanced routing, traffic splitting, and standardization benefits. While the video was lengthy and recorded late at night, Piyush humorously acknowledges the personal sacrifices involved and expresses gratitude to viewers. He concludes by encouraging further exploration of the Gateway API through Kubernetes documentation and teases the next video, which will focus on migrating from Ingress to Gateway API—a critical topic for the CK exam. --- ### Key Takeaways 1. **Gateway API Advantages**: Offers enhanced routing capabilities, traffic splitting, and vendor-neutral configurations. 2. **Layered Architecture**: Facilitates collaboration among infrastructure teams, cluster operators, and developers. 3. **Practical Implementation**: Demonstrates real-world deployment and troubleshooting, highlighting common pitfalls and solutions. 4. **Preparation for CK Exam**: Provides valuable insights and hands-on experience for mastering Gateway API concepts. By combining theory, practical examples, and troubleshooting, this session equips viewers with a comprehensive understanding of the Gateway API, preparing them for both real-world applications and certification exams.
Course: Certified Kubernetes Administrator Full Course For beginners | CKA 2025
This playlist contains the complete CKA series for beginners, based on the latest 2025 curriculum. It includes 40+ videos with hands-on demos, assignments, and exam-based scenarios. We will cover everything from the basics to the Advanced, including fundamental concepts such as Docker, containers, Docker storage and networking, DNS, etc.
View Full Course