Deploy the NetScaler Ingress Controller on a Rancher managed Kubernetes cluster
Rancher is an open-source platform with an intuitive user interface that helps you to easily deploy and manage Kubernetes clusters. Rancher supports Kubernetes clusters on any infrastructure be on cloud or on-premises deployment. Rancher also allows you to centrally manage multiple clusters running across your organization.
The NetScaler Ingress Controller is built around the Kubernetes Ingress and it can automatically configure one or more NetScalers based on the Ingress resource configuration. You can deploy the NetScaler Ingress Controller in a Rancher managed Kubernetes cluster to extend the advanced load balancing and traffic management capabilities of NetScaler to your cluster.
Prerequisites
You must create a Kubernetes cluster and import the cluster on the Rancher platform.
Deployment options
You can either deploy NetScaler CPXs as pods inside the cluster or deploy a NetScaler MPX or VPX appliance outside the Kubernetes cluster.
Based on how you want to use NetScaler, there are two ways to deploy the NetScaler Ingress Controller in a Kubernetes cluster on the Rancher platform:
-
As a sidecar container alongside NetScaler CPX in the same pod: In this mode, NetScaler Ingress Controller configures the NetScaler CPX.
-
As a standalone pod in the Kubernetes cluster: In this mode, you can control the NetScaler MPX or VPX appliance deployed outside the cluster.
Deploy the NetScaler Ingress Controller as a sidecar with NetScaler CPX
In this deployment, you can use the NetScaler CPX instance for load balancing the North-South traffic to microservices in your Kubernetes cluster. NetScaler Ingress Controller is deployed as a sidecar alongside the NetScaler CPX container in the same pod using the citrix-k8s-cpx-ingress.yaml file.
Perform the following steps to deploy the NetScaler Ingress Controller as a sidecar with NetScaler CPX on the Rancher platform.
-
Download the
citrix-k8s-cpx-ingress.yamlfile using the following command.wget https://raw.githubusercontent.com/citrix/citrix-k8s-ingress-controller/master/deployment/baremetal/citrix-k8s-cpx-ingress.yml - On the Rancher GUI cluster page, select Clusters from Global view.
- From the Clusters page, open the cluster that you want to access.
- Click
Launch kubectlto open a terminal for interacting with your Kubernetes cluster. - Create a file named
cpx.yamlin the launched terminal and then copy the contents of the modifiedcitrix-k8s-cpx-ingress.yamlfile to thecpx.yamlfile. -
Deploy the newly created YAML file using the following command.
kubectl create -f cpx.yaml -
Verify if NetScaler Ingress Controller is deployed successfully using the following command.
kubectl get pods --all-namespaces
Deploy the NetScaler Ingress Controller as a standalone pod
In this deployment, NetScaler Ingress Controller which runs as a stand-alone pod allows you to control the NetScaler MPX, or VPX appliance from the Kubernetes cluster. You can use the citrix-k8s-ingress-controller.yaml file for this deployment.
Before you begin: Ensure that you complete all the prerequisites required for deploying the NetScaler Ingress Controller.
To deploy the NetScaler Ingress Controller as a standalone pod on the Rancher platform:**
-
Download the
citrix-k8s-ingress-controller.yamlfile using the following command:wget https://raw.githubusercontent.com/citrix/citrix-k8s-ingress-controller/master/deployment/baremetal/citrix-k8s-ingress-controller.yaml -
Edit the
citrix-k8s-ingress-controller.yamlfile and enter the values of the environment variable using the information in Deploy NetScaler Ingress Controller as a pod.Note: To update the
Status.LoadBalancer.Ingressfield of the Ingress resources managed by the NetScaler Ingress Controller with the allocated IP addresses, you must specify the command line argument--update-ingress-status yeswhen you start the NetScaler Ingress Controller. For more information, see Updating the Ingress status for the Ingress resources with the specified IP address. - On the Rancher GUI cluster page, select Clusters from Global view.
- From the Clusters page, open the cluster that you want to access.
- Click
Launch kubectlto open a terminal for interacting with your Kubernetes cluster. - Create a file named
cic.yamlin the launched terminal and then copy the content of the modifiedcitrix-k8s-ingress-controller.yamlfile tocic.yaml. -
Deploy the
cic.yamlfile using the following command.kubectl create -f cic.yaml -
Verify if the NetScaler Ingress Controller is deployed successfully using the following command.
kubectl get pods --all-namespaces