
Environment Overview
Begin by verifying the cluster nodes. In this setup, there is only one node present:app-space, ingress-nginx, and kube-system:
Verifying the Ingress Controller
Although Ingress Controllers are often deployed in thekube-system namespace, here it is installed in the ingress-nginx namespace. View all pods across namespaces with:
ingress-nginx namespace, run:
Inspecting Applications and Ingress Resources in app-space
The applications reside in theapp-space namespace. Listing pods demonstrates three deployed applications:
app-space:
- Requests to
/wearare routed to thewear-service. - Requests to
/watchare handled by thevideo-service. - Traffic not matching these paths is sent to the
default-http-backend, resulting in a 404 error.
/watch or /wear to the URL correctly routes traffic to the respective applications.
Modifying Ingress Paths: Changing the Video Service Path
To change the video streaming endpoint from/watch to /stream, edit the Ingress resource in the app-space namespace. The original configuration is:
/stream:
/watch route will now result in a 404 error, while navigating to /stream displays the video streaming application as expected.
Adding a New Path for the Food Delivery Application
A recently acquired food delivery application (webapp-food) is now running in the app-space namespace. Verify its deployment along with other applications:
/eat, update the Ingress resource to include a new path:
/eat will display the food delivery application.
Exposing a New Payment Service from a Separate Namespace
A critical payment service is deployed in a dedicated namespace calledcritical-space. Verify its deployment and service details:
It is recommended to create Ingress resources within the same namespace as the underlying application for better access control and management.
/pay using the following imperative command:
/pay returns a 404 error because the Flask application is serving content only at the root URL /. Check the application logs to confirm:
/pay prefix before forwarding requests to the backend. Update the Ingress resource as shown:
/pay, the prefix is stripped and the payment service receives the request at its root path. Verification via logs and browser confirms the service now responds correctly.
