Install and Configure the Ingress Controller
While the domain is now up and running, it is currently only accessible from inside the Kubernetes cluster. Before you can expose your application, you need to install an ingress controller. WKT UI can install the Traefik or NGINX ingress controllers. In this exercise, you will use Traefik.
Go to the Kubernetes > Ingress Controller page. Even though the default settings should be sufficient, you will
create an image pull secret for Docker Hub, as shown in the following image, to make sure that your cluster doesn’t
encounter an error due to Docker Hub rate limiting of anonymous pull requests. When ready, click
Install Ingress Controller.
After the ingress controller is installed, next you will expose your application by creating an ingress route.
At the bottom of the page, click the plus sign on the Ingress Routes Configuration table to add a new route. When the
row appears, click the pencil icon to edit the route. Set the fields of the route, as shown in the following image.
Notice that WKT UI has queried the services in the domain’s namespace and provides a drop-down menu from which to
choose. To route to your mycluster cluster, set the Target Service field to the
todolist-domain-cluster-mycluster service, which the operator created automatically when deploying the domain. This
service is exposing only port 8100 so select that for the Target Port. When finished, click OK to update the
Ingress Routes Configuration table.
Now that the ingress route is ready, click Update Ingress Routes to create the route. The Update Ingress Routes action is a little different from other actions in WKT UI. Most Kubernetes clusters use a single ingress controller that routes traffic for all applications in the Kubernetes cluster. Because of the complexities of ingress controllers and their varying implementations, it is very difficult to know how to update an existing rule so WKT UI can only replace it. Therefore, when WKT UI detects that one or more of the rules that you are trying to create already exists, it prompts you to verify that you want to overwrite the existing rule.