Deploy NetScaler CPX as an Ingress device in an Azure Kubernetes Service cluster using Azure repository images
This topic explains how to deploy NetScaler CPX as an ingress device in an Azure Kubernetes Service (AKS) cluster.
Get NetScaler CPX from Azure Marketplace
To deploy NetScaler CPX, an image registry should be created on Azure and the corresponding image URL should be used to fetch the NetScaler CPX image. For more information on how to create a registry and get image URL, see Get NetScaler CPX from Azure Marketplace.
Once the registry is created, the NetScaler CPX registry name should be attached to the AKS cluster used for deployment.
az aks update -n <cluster-name> -g <resource-group-where-aks-deployed> --attach-acr <cpx-registry>
Get NetScaler Ingress Controller from Azure Marketplace
To deploy the NetScaler Ingress Controller, an image registry should be created on Azure and the corresponding image URL should be used to fetch the CIC image. For more information on how to create registry and get image URL, see Get NetScaler Ingress Controller from Azure Marketplace.
Once the registry is created, the NetScaler Ingress Controller registry name should be attached to the AKS cluster used for deployment.
az aks update -n <cluster-name> -g <resource-group-where-aks-deployed> --attach-acr <cic-registry>
Deploy NetScaler CPX as an ingress device in an AKS cluster
Perform the following steps to deploy NetScaler CPX as an ingress device in an AKS cluster.
Note:
In this procedure, Apache web server is used as the sample application.
-
Deploy the required application in your Kubernetes cluster and expose it as a service in your cluster using the following command.
kubectl create -f https://raw.githubusercontent.com/citrix/citrix-k8s-ingress-controller/master/deployment/azure/manifest/apache.yaml
Note:
In this example,
apache.yaml
is used. You should use the specific YAML file for your application. -
Deploy NetScaler CPX as an ingress device in the cluster using the following steps:
-
Download the YAML file using the following command.
wget https://raw.githubusercontent.com/citrix/citrix-k8s-ingress-controller/master/deployment/azure/manifest/azureimage-standalone_cpx.yaml
-
Update the NetScaler CPX image with the Azure image URL in
azureimage-standalone_cpx.yaml
file.- name: cpx-ingress image: "<azure-cpx-instance-url>"
-
Update the NetScaler Ingress Controller image with the Azure Image URL in
azureimage-standalone_cpx.yaml
file.- name: cic image: "<azure-cic-instance-url>"
-
After updating the required values, deploy the
azureimage-standalone_cpx.yaml
file.kubectl create -f azureimage-standalone_cpx.yaml
-
-
Create the ingress resource using the following command.
kubectl create -f https://raw.githubusercontent.com/citrix/citrix-k8s-ingress-controller/master/deployment/azure/manifest/cpx_ingress.yaml
-
Create a service of type LoadBalancer for accessing the NetScaler CPX by using the following command.
kubectl create -f https://raw.githubusercontent.com/citrix/citrix-k8s-ingress-controller/master/deployment/azure/manifest/cpx_service.yaml
This command creates an Azure load balancer with an external IP for receiving traffic.
-
Verify the service and check whether the load balancer has created an external IP. Wait for some time if the external IP is not created.
kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE apache ClusterIP 10.0.103.3 none 80/TCP 2 m cpx-ingress LoadBalancer 10.0.37.255 pending 80:32258/TCP,443:32084/TCP 2 m Kubernetes ClusterIP 10.0.0.1 none 443/TCP 22 h -
Once the external IP for the load-balancer is available as follows, you can access your resources using the external IP for the load balancer.
kubectl get svc |NAME|TYPE|CLUSTER-IP|EXTERNAL-IP|PORT\(S)| AGE| |---|---|----|----|----|----| |apache|ClusterIP|10.0.103.3 |none|80/TCP| 3 m| |cpx-ingress |LoadBalancer|10.0.37.255| EXTERNAL-IP CREATED| 80:32258/TCP,443:32084/TCP | 3 m| |Kubernetes| ClusterIP|10.0.0.1 |none| 443/TCP| 22 h|
Note:
The health check for the cloud load-balancer is obtained from the readinessProbe configured in the NetScaler CPX deployment yaml file. If the health check fails, you should check the readinessProbe configured for NetScaler CPX. For more information, see readinessProbe and external Load balancer.
-
Access the application using the following command.
curl http://<External-ip-of-loadbalancer>/ -H 'Host: citrix-ingress.com