Prerequisites: Service, Ingress

Let’s define and launch two deployments that would create 4 replicas of nginx and 4 replicas of helloworld image

Let’s expose these deployments using NodePort services one for each

We could know check the services’ status and create an Ingress object with two http paths one for each service, these are defined at spec > rules of the Ingress manifest

There are two URL Paths here, so when someone access the public IP of the Ingress object, they should land on the nginx home page, as the filtering path is /*. Similarly when the public ingress IP is accessed in the form /v2/, they should land on the v2 homepage of the hello app, note that this path (/v2) should already be existing in the container which can be checked by curling one of the Pod IPs like curl /v2/, however here we don’t have to be concerned about that as the hello app v2 comes with the /v2 path. Please note that there should be a ‘/’ after v2

Let’s create the Ingress object, and check it’s status

We should now be able to access the nginx and hello app applications, please enter the public IP on the browser

nginx at

Hello app at /v2/

--end-of-post--