Ingress Controller
Contents
- Ingress Controller
- Design View
- Code View
- Install Ingress Controller
- Update Ingress Routes
- Uninstall Ingress Controller
Ingress Controller
This section supports two distinct functions related to an ingress controller. First, it supports installing an ingress controller to a Kubernetes cluster. Second, it supports adding the necessary routes to an ingress controller to make a deployed WebLogic domain’s endpoints accessible.
Design View
Design View helps you specify the data needed to install an ingress controller, if desired, and
specify the data needed to expose one or more endpoints for a deployed WebLogic domain. This page contains three panes:
Ingress Controller Configuration
The most important field in this pane is the Ingress Provider field. This fields tells the WKT UI application with
which of the supported ingress controllers it will need to work. The current release supports two ingress
controllers:
- NGINX
- Traefik
To install the ingress controller, enable Install Ingress Controller.
- To set the release name used by the Helm install process, use the
Helm Release Name to Usefield. - Set the Kubernetes namespace to which the ingress controller should be installed with the
Ingress Controller Namespacefield.
The container image for the Traefik ingress controller resides in Docker Hub. Due to changes made to Docker Hub, anonymous pull requests are throttled. This can result in pull requests being denied when the Kubernetes cluster attempts to pull the image and start the container.
- To work around this limitation, enable the
Use Docker Hub Secretfield to provide login credentials for Docker Hub. - The
Docker Registry Secret Namefield specifies the name of the Kubernetes pull secret to use when pulling the image. To create this secret, enableCreate Docker Hub Secretand fill in theDocker Hub Image Registry Pull Credentialsfield, usingAdd Image Registry Credentialsbutton to create a new entry, as needed. - For the NGINX ingress controller, if you want to have SSL pass through the ingress route, enable
Allow SSL pass through to target service.
TLS Secret for Ingress Routes
Use this pane to configure the Transport Layer Security (TLS) secret containing the certificate and private key data that will be used by the ingress controller when establishing HTTPS connections from clients to the ingress controller. The TLS connection will be terminated at the ingress controller, so traffic between the ingress controller and services/pods will not be encrypted. In the current release, only a single TLS certificate is supported for the routes being defined.
- To use TLS-enabled routes, enable
Use Ingress TLS Secretand provide the secret name using theIngress TLS Secret Namefield. - To have the application create this secret, enable
Create Ingress TLS Secret. - If you already have a certificate file and its corresponding private key file, then use the
TLS Certificate FileandTLS Private Key Filefields to provide them. - To create these files automatically, enable
Generate a TLS Certificate and Private Key.- Provide the path to the OpenSSL executable using the
OpenSSL Executable to Usefield. - Use the
Subject to Use for the Generated TLS Certificatefield to specify the data to put into the subject of the certificate.- For example, if your ingress route will use the virtual host name
www.myapp.com, you might specify the subject contents as/CN=www.myapp.com. - The subject data will support multiple
key/value pairs using a comma-separated syntax, like
/key1=value1,/key2=value2,/key3=value3.
- For example, if your ingress route will use the virtual host name
- Provide the path to the OpenSSL executable using the
Ingress Routes Configuration
Use the table in this section to define the ingress routes to be added by the application. Note that this table does not currently display existing routes already defined. Any routes defined in or removed from the table will happen in the WKT Project object. When applying or updating the routes, only the fields currently in the table will be considered. If the routes do not exist, then they will be added. If one or more of the routes already exists, then the application will warn you to confirm whether you want to update the existing route or routes before performing the operation.
To add a new route, click the plus (+) button in the table header. To edit a route, use the edit button on the
corresponding route row. To remove a route, use the delete icon on the corresponding route row.
When editing a route:
- Use the
Namefield to set the route name. - Use the
Virtual HostandPath Expressionfields to define the matching rules that determine which requests match this route. - All requests in the defined rules are routed to the service specified by the
Target Servicefield that resides in the namespace specified by the read-onlyTarget Service Namespacefield and the port specified by theTarget Portfield. After the domain has been deployed, you can select theTarget Servicevalue from the drop-down list of available services in the WebLogic Kubernetes Operator domain’s namespace. After theTarget Serviceis selected, you can select theTarget Portfrom the list of available ports in the selected target service. - Specify the
Transport Optionfor the ingress route:- Select
Plain HTTPfor unencrypted traffic from the client through the ingress controller to the target service. - Select
SSL terminate at ingress controllerfor SSL terminating at the ingress controller and then unencrypted traffic from the ingress controller to the target service.- Enable
Is target service WebLogic Console?if the target service is theWebLogic Consoleservice.
- Enable
- Select
SSL pass throughfor SSL traffic to pass through the ingress controller and then terminate at the target service.- If you select this option, you must also specify a valid DNS value in ‘Virtual Host’, and all SSL traffic from
the
Virtual Hostwill be routed to the target service. - Make sure that the
Target Portsupports SSL.
- If you select this option, you must also specify a valid DNS value in ‘Virtual Host’, and all SSL traffic from
the
- Select
- Use the
Ingress Route Annotationstable to add annotations to the ingress route, as needed. Do not remove any pre-populated annotations.
Code View
Code View displays shell scripts for installing an ingress controller and for updating ingress routes. It also
displays the YAML definitions of the routes to be added, if applicable.
If it is not already selected, then use the Script Language drop-down menu to choose the desired scripting language.
Note that the application is providing a working sample script simply to show how the process might be automated.
Before using the script, review the script and make any changes necessary for your environment. One typical change that
would be considered a best practice would be to change the script to accept either command-line arguments or externally
set environment variables to specify any credentials required by the script to eliminate hard-coding the credentials in
the script itself. This change is left as an exercise for you because different environments typically will have
existing standards for securely handling such credentials.
Install Ingress Controller
Install Ingress Controller creates any namespace and secret specified and runs the ingress controller’s Helm
chart to install the ingress controller. You access this action by using the Install Ingress Controller button on the
Ingress Controller page or the Go > Install Ingress Controller menu item.
Update Ingress Routes
Update Ingress Routes creates the TLS secret, if needed, and adds or updates the specified ingress routes. You access
this action by using the Update Ingress Routes button on the Ingress Controller page or
the Go > Update Ingress Routes to Domain menu item.
Uninstall Ingress Controller
Uninstall Ingress Controller uses the helm uninstall command to remove all the ingress resources
and uninstall the ingress controller. In addition, you can choose whether to also delete the corresponding namespace.
You access these actions by using the Uninstall Ingress Controller button on the
Ingress Controller page or the Go > Uninstall Ingress Controller menu item.