NetScaler CPX License Aggregator

Currently, NetScaler CPXs obtain licenses from the NetScaler ADM server. In a Kubernetes environment, NetScaler CPXs can dynamically come up or go down. If a NetScaler CPX unexpectedly goes down, it takes few minutes for the NetScaler ADM server to reclaim the license. The NetScaler ADM server must be able to reclaim such licenses immediately as and when NetScaler CPXs go down so that the same license can be allocated to another upcoming NetScaler CPX. Also, if the NetScaler ADM server is not reachable for any reason, you cannot license new NetScaler CPXs in the cluster.

NetScaler CPX License Aggregator is a Kubernetes service provided by NetScaler. This service acts as a local provider for NetScaler CPX licensing within a Kubernetes cluster. The NetScaler CPX License Aggregator service deployed in a Kubernetes cluster can act as an intermediary between NetScaler CPXs and the ADM licensing server and keep track of NetScaler CPXs and the allotted licenses. With the NetScaler CPX License Aggregator service, the NetScaler ADM server can reclaim licenses immediately as and when NetScaler CPXs goes down.

In a Kubernetes cluster, the NetScaler CPX License Aggregator service supports both NetScaler CPX as sidecar and standalone deployments.

Note:

Licensing using NetScaler CPX License Aggregator requires NetScaler CPX 13.1-30.x or later. NetScaler CPX License Aggregator does not support licensing the older versions of NetScaler CPX.

Key benefits of NetScaler CPX License Aggregator

The following are the key benefits of using NetScaler CPX License Aggregator:

  • Scalability: A NetScaler ADM licensing server can support only up to 10000 NetScaler CPX deployments. With the introduction of NetScaler CPX License Aggregator service, each Kubernetes cluster can act as a single client to the NetScaler ADM licensing server. Hence, you can scale many NetScaler CPXs with a single NetScaler ADM licensing server.

  • Resource optimization: The NetScaler CPX License Aggregator service also supports cluster-wide licensing capability and it can also check out licenses from the NetScaler ADM server on a need basis. NetScaler CPX License Aggregator can return licenses back to the NetScaler ADM server. NetScaler CPX License Aggregator can handle ungraceful termination of NetScaler CPXs and reclaim licenses from such NetScaler CPXs after the configured waiting period.

Deployment topology

The following diagram shows a NetScaler CPX License Aggregator deployment within a Kubernetes cluster.

NetScaler CPX License Aggregator deployment

In this diagram:

  • CPX means NetScaler CPX
  • CPX License Aggregator means NetScaler CPX License Aggregator

In this sample deployment, a NetScaler CPX License Aggregator service is deployed within the Kubernetes cluster along with NetScaler CPXs and NetScaler ADM agent. The NetScaler CPX License Aggregator service acts as an intermediary between NetScaler CPXs and NetScaler ADM agent and monitors all NetScaler CPXs within the cluster and manages licenses to them.

Deploy NetScaler CPX License Aggregator using Helm charts

Prerequisites

The following prerequisites apply:

  • You need Kubernetes version 1.16 and later.

  • You need the Helm version 3.x or later.

  • You must get the IP address of the license server that has the license for NetScaler CPX.

  • You must provide a password for the Redis database in NetScaler CPX License Aggregator. You can provide the database password using the Kubernetes secret and the following command can be used to create the secret:

     kubectl create secret generic dbsecret --from-literal=password=<custom-password>
    

Deployment using Helm charts

Do the following steps to deploy NetScaler CPX License Aggregator using Helm charts depending on the type of NetScaler CPX license. For more information about the different type of NetScaler CPX licenses, see NetScaler CPX licensing.

Installing the Helm chart

Add the NetScaler CPX License Aggregator Helm chart repository using the following command:

    helm repo add Citrix https://citrix.github.io/citrix-helm-charts/

Installing NetScaler CPX License Aggregator to manage bandwidth pooled licenses

Use one of the following commands depending on the type of NetScaler CPX pooled license that you have. In these commands, my-release is used as the release name.

Note:

By default, the Helm chart installs the recommended RBAC roles and role bindings.

For platinum bandwidth license:

    helm install my-release citrix/cpx-license-aggregator --set licenseServer.address=<License-Server-IP-or-FQDN>,redis.secretName=<Kubernetes-Secret-for-DB-password>,licenseAggregator.username=<unique-ID-for-CLA>,licenseInfo.instanceQuantum=<QUANTUM>,licenseInfo.instanceLowWatermark=<LOW WATERMARK>,licenseInfo.bandwidthPlatinumQuantum=<QUANTUM-in-Mbps>,licenseInfo.bandwidthPlatinumLowWatermark=<LOW WATERMARK-in-Mbps>

For enterprise bandwidth edition:

    helm install my-release citrix/cpx-license-aggregator --set licenseServer.address=<License-Server-IP-or-FQDN>,redis.secretName=<Kubernetes-Secret-for-DB-password>,licenseAggregator.username=<unique-ID-for-CLA>,licenseInfo.instanceQuantum=<QUANTUM>,licenseInfo.instanceLowWatermark=<LOW WATERMARK>,licenseInfo.bandwidthEnterpriseQuantum=<QUANTUM-in-Mbps>,licenseInfo.bandwidthEnterpriseLowWatermark=<LOW WATERMARK-in-Mbps>

For standard bandwidth edition:

    helm install my-release citrix/cpx-license-aggregator --set licenseServer.address=<License-Server-IP-or-FQDN>,redis.secretName=<Kubernetes-Secret-for-DB-password>,licenseAggregator.username=<unique-ID-for-CLA>,licenseInfo.instanceQuantum=<QUANTUM>,licenseInfo.instanceLowWatermark=<LOW WATERMARK>,licenseInfo.bandwidthStandardQuantum=<QUANTUM-in-Mbps>,licenseInfo.bandwidthStandardLowWatermark=<LOW WATERMARK-in-Mbps>

These commands deploy the NetScaler CPX License Aggregator on the Kubernetes cluster with the default configuration. You can configure the parameters at the time of installation. For more information, see the NetScaler CPX License Aggregator configuration section in the Helm chart GitHub repository that lists the mandatory and optional parameters that you can configure during installation.

Installing NetScaler CPX License Aggregator to manage vCPU Licenses

Use one of the following commands depending on the type of NetScaler CPX vCPU license that you have. In these commands, my-release is used as the release name.

Note: By default, the Helm chart installs the recommended RBAC roles and role bindings.

For platinum vCPU edition:

    helm install my-release citrix/cpx-license-aggregator --set licenseServer.address=<License-Server-IP-or-FQDN>,redis.secretName=<Kubernetes-Secret-for-DB-password>,licenseAggregator.username=<unique-ID-for-CLA>,licenseInfo.vcpuPlatinumQuantum=<QUANTUM>,licenseInfo.vcpuPlatinumLowWatermark=<LOW WATERMARK>

For enterprise vCPU edition:

    helm install my-release citrix/cpx-license-aggregator --set licenseServer.address=<License-Server-IP-or-FQDN>,redis.secretName=<Kubernetes-Secret-for-DB-password>,licenseAggregator.username=<unique-ID-for-CLA>,licenseInfo.vcpuEnterpriseQuantum=<QUANTUM>,licenseInfo.vcpuEnterpriseLowWatermark=<LOW WATERMARK>

For standard vCPU edition:

    helm install my-release citrix/cpx-license-aggregator --set licenseServer.address=<License-Server-IP-or-FQDN>,redis.secretName=<Kubernetes-Secret-for-DB-password>,licenseAggregator.username=<unique-ID-for-CLA>,licenseInfo.vcpuStandardQuantum=<QUANTUM>,licenseInfo.vcpuStandardLowWatermark=<LOW WATERMARK>

Installing NetScaler CPX License Aggregator to manage multiple licenses

If you need NetScaler CPX license aggregator to manage multiple types of licenses, then the relevant arguments of those licenses must be specified in the Helm command.

For example:

To deploy NetScaler CPX License Aggregator for pooled platinum bandwidth edition and vCPU platinum edition licenses:

      helm install demo citrix/cpx-license-aggregator --set licenseServer.address=<License-Server-IP-or-FQDN>,redis.secretName=<Kubernetes-Secret-for-DB-password>,licenseAggregator.username=<unique-ID-for-CLA>,licenseInfo.instanceQuantum=<QUANTUM>,licenseInfo.instanceLowWatermark=<LOW WATERMARK>,licenseInfo.bandwidthPlatinumQuantum=<QUANTUM-in-Mbps>,licenseInfo.bandwidthPlatinumLowWatermark=<LOW WATERMARK-in-Mbps>,licenseInfo.vcpuPlatinumQuantum=<QUANTUM>,licenseInfo.vcpuPlatinumLowWatermark=LOW WATERMARK>

Configuring NetScaler CPX to get license from NetScaler CPX License Aggregator

When you use NetScaler CPX License Aggregator for licensing NetScaler CPX, the environment variable CLA need to be provided in the NetScaler CPX deployment YAML.

The ipaddress or domainname using which NetScaler CPX License Aggregator can be accessed must be provided in this environment variable as follows:

      env:
      - name: "CLA"
        value: "192.0.2.2" 

Or

      env:
      - name: "CLA"
        value: "local-cla.org" 

You must provide the following environment variables as well in the NetScaler CPX YAML.

  • POD_NAME: Specifies the name of the pod. The name of the pod is exposed to NetScaler CPX as an environment variable.
  • POD_NAMESPACE: Specifies the namespace of the pod. The namespace of the pod is exposed to NetScaler CPX as an environment variable.
  • Bandwidth: Specifies the bandwidth in Mbps for allocating to NetScaler CPX.
  • Edition: Specifies the license edition. The supported values include Standard, Platinum, and Enterprise.
  • CPX_CORES : Specifies the number of cores that you want to run for NetScaler CPX.

For more information on different NetScaler CPX licensing options, see NetScaler CPX licensing.

The following shows shows a sample configuration with these environment variables:

      - name: POD_NAME
        valueFrom:
          fieldRef:
            apiVersion: v1
            fieldPath: metadata.name
      - name: POD_NAMESPACE
        valueFrom:
          fieldRef:
            apiVersion: v1
            fieldPath: metadata.namespace
      - name: “BANDWIDTH”
        value: 1000
      - name: “CPX_CORES” 
        value: 1
      - name: “EDITION”
        value: PLATINUM

You also need to add the following label to the NetScaler CPX YAML:

     labels:
       adc: citrix

For a sample deployment of NetScaler CPX License Aggregator, see NetScaler CPX License Aggregator: Sample deployment.

NetScaler CPX License Aggregator