Installing NGINX Ingress Controller
You must install NGINX Ingress Controller to terminate Transport Layer Security (TLS) and route traffic to HCL OneTest™ Server. You can install NGINX Ingress Controller by pulling the images from Azure Container Registry (ACR) when you do not to pull want to pull the images from the public registries.
Before you begin
You must have completed the following tasks:
-
Set up the Azure Kubernetes Service (AKS) cluster with Kubernetes V1.19. For more information, refer to Azure Kubernetes Service documentation.
-
Installed the following software:
-
Git Bash. For more information, refer to the Git documentation.
-
Helm V3.5.2. For more information, refer to the Helm documentation.Note: The Helm command must be in one of the directories in your PATH environment variable.
-
kubectl tool V1.19. For more information, refer to the Kubernetes documentation.
-
Azure command-line interface (CLI) V2.0.64. For more information, refer to the Azure CLI documentation.
Note: You can run theaz version
command to find the version and dependent libraries that are installed.
-
-
Logged in to the AKS cluster. You can run the
az login
command to log in to AKS interactively. -
Set your subscription to active azure subscription. You can run the
az account set --subscription <subscription_name>
command to set your active subscription. -
Configured the location of your AKS cluster. You can run the
az configure --defaults location=<location_name>
command to set your location of your AKS cluster.Tip: You can run the following command to get the list of all the available locations:az account list-locations --query "[].{DisplayName:displayName, Name:name}" -o table
About this task
You must replace the following variables with the actual value in this procedure:
-
<resource_group>
with the name of the resource group that you created during the creation of the AKS cluster. -
<azure_cluster>
with the name of the Azure cluster that you created during the creation of the AKS cluster. -
<azure_container_registry>
with the name of ACR that you created during the AKS setup. -
<ip_address>
with the internal IP address to use with the ingress controller.Note: You must ensure that the IP address is not already in use within your virtual network.
Procedure
-
Run the following command to configure kubectl to connect to
the AKS cluster:
az aks get-credentials -g <resource_group> -n <azure_cluster>
Note: You can verify the connection to the AKS cluster by running the kubectl get nodes command that displays a list of the cluster nodes. -
Add the NGINX Ingress Controller repository to Helm by running the following
command:
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx --force-update
- Optional:
Perform the following steps if you want to install NGINX Ingress Controller
from ACR:
-
Create a namespace in which you want to install NGINX Ingress Controller by
running the following command:
kubectl create namespace ingress-nginx
Remember:ingress-nginx
is the name of the namespace. If you created a namespace by using a different value, then you must use that value in place of theingress-nginx
in all the instances in this procedure. -
Run the following command to label the namespace so that network policies
facilitate traffic to pods of HCL OneTest™ Server:
kubectl label namespace ingress-nginx app.kubernetes.io/name=ingress-nginx
-
Perform one of the following steps to install NGINX Ingress Controller based on
your requirement:
-
Run the following command to verify that external-IP is assigned to NGINX
Ingress Controller:
kubectl get svc -n ingress-nginx ingress-nginx-controller
Note: The status of EXTERNAL-IP displayed as Pending for few minutes. If the status does not change to $INGRESS IP, then that indicates you have a permissions problem. You can run the following command to investigate the problem:kubectl describe svc -n ingress-nginx ingress-nginx-controller