NetScaler ingress controller

Deploy NetScaler IPAM controller

NetScaler provides an IPAM controller for IP address management. NetScaler IPAM controller runs in parallel to NetScaler Ingress Controller in the Kubernetes cluster. NetScaler IPAM controller allocates IP addresses to services of type LoadBalancer and ingress resources from a specified IP address range.

NetScaler IPAM controller requires NetScaler’s VIP custom resource definition (CRD). The VIP CRD is used for internal communication between NetScaler Ingress Controller and NetScaler IPAM controller.

Prerequisites

  • Kubernetes cluster and a kubectl command-line tool to communicate with the cluster.

  • Create a namespace called netscaler to isolate resources. Run the following command to create a namespace:

     kubectl create namespace netscaler
    
  • Install NetScaler Ingress Controller for your NetScaler VPX or NetScaler MPX using the following Helm commands.

Note:

Ensure to create a secret using NetScaler VPX or NetScaler MPX credentials before running the following commands.

helm repo add netscaler https://netscaler.github.io/netscaler-helm-charts/
      
helm install NetScaler-ingress-controller netscaler/NetScaler-ingress-controller --set nsIP=<NSIP of MPX/VPX>,license.accept=yes,adcCredentialSecret=<Secret-for-ADC-credentials>,ingressClass[0]=netscaler,serviceClass[0]=netscaler,ipam=true,crds.install=true -n netscaler
<!--NeedCopy-->

For detailed information about deploying and configuring NetScaler Ingress Controller using Helm charts, see the Helm chart repository.

Deploy IPAM controller

  1. Add the NetScaler Helm chart repository to your local registry using the following command.

      helm repo add netscaler https://netscaler.github.io/netscaler-helm-charts/
      <!--NeedCopy-->
    
  2. Install NetScaler IPAM controller using the following command.

      helm install netscaler-ipam-controller netscaler/netscaler-ipam-controller --set vipRange='[{"<VIP-range-key>": ["<ip-range>"]}]' -n netscaler
      <!--NeedCopy-->
    

For information about all the configurable parameters while installing the IPAM controller using Helm charts, see the Helm chart repository.

IP address allocations

  • For services of type LoadBalancer, a unique IP address is allocated to each service from the VIP range.

  • For an ingress resource, an IP address in the specified IP range is allocated. When more ingress resources refer to the same VIP range, the IP address allocated to the first ingress resource is allocated to all the other ingress resources.

  • Both services of type LoadBalancer and ingress resources can use NetScaler IPAM controller for IP address allocations at the same time. If an IP address is allocated to any one resource type, it is not available for another resource type. But, the same IP address can be allocated to multiple ingress resources.

Environment variables in IPAM controller

This section provides information about the environment variables in NetScaler IPAM controller.

VIP_RANGE

The VIP_RANGE environment variable allows you to define the IP address range. You can either define an IP address range or an IP address range associated with a unique name.

IP address range

You can define the IP address range from a subnet or multiple subnets. Also, you can use the - character to define the IP address range. The IPAM controller assigns the IP address from this IP address range to the service.

IP address range associated with a unique name

You can assign a unique name to the IP address range and define the range in the VIP_RANGE environment variable. This way of assigning the IP address range enables you to differentiate between the IP address ranges. When you create the services of type LoadBalancer, you can use the service.citrix.com/ipam-range annotation in the service definition to specify the IP address range to use for IP address allocation.

Reference

  • For information about exposing services of type LoadBalancer with IP addresses assigned by the IPAM controller, see this section.
Deploy NetScaler IPAM controller