Establish a network between Kubernetes nodes and NetScaler instance outside the Kubernetes cluster

For seamless functioning of services deployed in a Kubernetes cluster, the Ingress NetScaler device must reach the overlay network where Pods run. You can get this connectivity in one of the following ways:

  1. Enable automatic route configuration in the NetScaler Kubernetes Gateway Controller.

    Set gatewayController.nodeWatch: true in the controller spec to create routes on NetScaler for each Pod subnet.

    Note:

    You can choose this option when NetScaler SNIP shares the same subnet as Kubernetes nodes.

  2. Deploy a NetScaler Node Controller to drive subnet routes from Kubernetes nodes.

Note:

gatewayController.nodeWatch is false by default.

Multiple clusters behind a single NetScaler

If one NetScaler balances traffic for multiple Kubernetes clusters, overlapping CNI subnets might cause route conflicts and static route injection can fail. In that scenario, use Policy-Based Routing (PBR) and provide a distinct set of SNIP values for each cluster.

Provide SNIPs through Helm settings, environment variable, or ConfigMap so the controller installs the correct PBR entries.

Use the following command to configure PBR SNIPs in NetScaler:

helm install my-release netscaler/netscaler-kubernetes-gateway-controller --set gatewayController.gatewayControllerName=citrix.com/nsgc-controller,license.accept=yes,gatewayController.entityPrefix=gwy,netscaler.nsncPbr="true",netscaler.adcCredentialSecret=<Secret-for-ADC-credentials>,netscaler.nsSNIPs='[<NS_SNIP1>\, <NS_SNIP2>\, ...]'
<!--NeedCopy-->
Establish a network between Kubernetes nodes and NetScaler instance outside the Kubernetes cluster