adm-agent

by NetScaler

Helm chartv141.37.40App 141.37.40Verified publisher

A Helm chart for NetScaler ADM Agent

About this chart

Deploy ADM agent

Deploy container-based ADM agent to connect NetScaler CPX with ADM Service for management and monitoring.

Table of Contents

  1. TL; DR;
  2. Introduction
  3. Generate authentication and authorization token from Access ID and Secret to access ADM
  4. Deploy ADM agent onboarding using Helm chart
  5. Manual creating login secret for NetScaler ADM Agent
  6. Automatic login secret for NetScaler ADM Agent
  7. Clean Up
  8. Configuration Parameters

TL; DR;

A) Deploy adm-agent

A.1) Get Access ID and Secret to access ADM

For Access ID and secret see this.

A.2) To create ADM agent login Secret, use the following command:

kubectl create secret generic admlogin --from-literal=username=nsroot --from-literal=password=<adm-agent-password> -n <namespace>

helm repo add netscaler https://netscaler.github.io/netscaler-helm-charts
helm install agent netscaler/adm-agent --namespace <namespace> --set accessSecret=<Access-Seret-Name>,loginSecret=<ADM-Login-Secret-Name>

Note: By default, helper.required=false and the customer is advised to create admlogin secret in every namespace where CPX is deployed if the namespace of CPX and ADM agent is different.

kubectl create secret generic admlogin --from-literal=username=nsroot --from-literal=password=<adm-agent-password> -n <namespace>

If you are deploying Netscaler CPX and ADM agent in different namespaces, please label namespace with citrix-cpx=enabled in which Netscaler CPX has been deployed and and deploy adm-agent with helper.required=true. In this case, the agent will take care of creating admlogin secret in other namespaces itself.For more information, see Create Secret automatically.

Introduction

NetScaler provides a container based ADM agent to connect NetScaler CPX with ADM service for management and monitoring of NetScaler CPX.

Prerequisites

  • Ensure that you have a NetScaler ADM account. To use ADM, you must create a Cloud account. To manage ADM with an Express account, see Getting Started.

  • Ensure that you installed Kubernetes version 1.16 or later. For more information about Kubernetes installation, see Kubernetes.

  • Ensure that you have installed Helm version 3.x. For information about Helm chart installation, see Helm.

  • Ensure that the ports described in the Ports document are open.

  • Ensure that serviceaccount adm-agent-serviceaccount is given privilege access. For more information, please see this

Get Access ID and Secret

Perform the following steps to get access ID and secret for accessing ADM:

  1. Log in to NetScaler ADM Service account.

  2. On the left Menu panel, select Identity and Access Management.

  3. Go to API Access.

  4. Specify the client name and click Create Client.

  5. Download and save the access-id and access-secret generated.

  6. You have to create Kubernetes secret using access-id and access-secret generated in previous step. These credentials are required for the agent to connect with NetScaler Console service.

    kubectl create secret generic accesssecret --from-literal=accessid= --from-literal=accesssecret= -n namespace

Deploy ADM agent using the Helm chart

Before deploying the ADM agent, you must create a Kubernetes Secret containing the access ID and Secret to access ADM. For information about getting the access ID and secret for accessing ADM, see Access ID and Secret to access ADM. After the Secret has been created, use the following commands to deploy ADM Agent:

helm repo add netscaler https://netscaler.github.io/netscaler-helm-charts

helm install agent netscaler/adm-agent --namespace <namespace> --set accessSecret=<Access-Seret-Name>,loginSecret=<ADM-Login-Secret-Name>

It deploys ADM Agent and registers with ADM service. It also deploys a sidecar along with ADM Agent which can create a Kubernetes Secret containing login credentials of ADM Agent automatically when namespace is labelled with citrix-cpx=enabled, more detail here. By default, helper.required=false and the customer is advised to create admlogin secret in every namespace where CPX is deployed if the namespace of CPX and ADM agent is different.

kubectl create secret generic admlogin --from-literal=username=nsroot --from-literal=password=<adm-agent-password> -n <namespace>

If you are deploying Netscaler CPX and ADM agent in different namespaces, please label namespace with citrix-cpx=enabled in which Netscaler CPX has been deployed and and deploy adm-agent with helper.required=true. In this case, the agent will take care of creating admlogin secret in other namespaces itself.For more information, see Create Secret automatically.

Create login secret manually for NetScaler ADM agent

ADM agent login credentials are required by NetScaler CPX while registering itself to ADM Service. You can create it manually on all the namespaces in which Netscaler CPX will be deployed and also on the namespace in which the ADM agent will be created.

kubectl create secret generic admlogin --from-literal=username=nsroot --from-literal=password=<adm-agent-password> -n <namespace> 

After the Secret has been created, you can deploy the ADM agent using the following command:

helm install agent netscaler/adm-agent --namespace <namespace> --set accessSecret=<Access-Seret-Name>,loginSecret=<ADM-Login-Secret-Name>

Automatic login secret for NetScaler ADM agent

ADM agent can create the secret for ADM agent and deploys a sidecar along with the ADM agent that creates the secret automatically whenever a namespace is labelled with citrix-cpx=enabled.

To label a namespace, use the following command:

kubectl label namespace <namespace> citrix-cpx=enabled

Clean up

To delete the resources created during the deployment of ADM agent adm-agent with the release name agent, use the following command:

helm uninstall agent -n <namespace>

NOTE While removing Agent, it removes CPX & cluster registered with Agent from ADM Service. You need remove the Cluster and Agent from NetScaler ADM UI manually in case any error happen.

ServiceAccount

To provide privileged permissions to the service account used by ADM Agent, please use following command

oc adm policy add-scc-to-user privileged system:serviceaccount:<namespace>:adm-agent-serviceaccount

Configuration parameters

The following table provides the configurable parameters and their default values in the Helm chart.

ParameterDescriptionDefault
imageRegistryImage registry of the ADM agent onboarding containerquay.io
imageRepositoryImage repository of the ADM agent onboarding containercitrix/adm-agent
imageTagImage tag of the ADM agent container141.37.40
pullPolicySpecifies the image pull policy for ADM agent.IfNotPresent
accessSecretSpecifies the ID and Secret to access ADM Service.Nil
loginSecretSpecifies the login Secret of NetScaler ADM agent.Nil
clusterPrefixKubernetes/Openshift Cluster Prefix. This will be used while registering cluster to ADM.Nil
helper.helperImageRegistryImage registry of NetScaler ADM agent helperquay.io
helper.helperImageRepositoryImage repository of NetScaler ADM agent helpercitrix/adm-agent-helper
helper.helperImageTagImage tag of NetScaler ADM agent helper2.0.1
helper.pullPolicySpecifies the image pull policy for ADM agent Helper.IfNotPresent
helper.requiredSet this to true, to create admlogin secret in all namespaces where CPX is deployed, in case the namespace of CPX and adm-agent is different.false
hpa.requiredSet this to true, to run hpa which scales CORE POD when memory and cpu threshold breachestrue
hpa.minReplicasMinimum replicas for CORE POD1
hpa.maxReplicasMaximum replicas for CORE POD to be scaled when memory or cpu threshold breaches10
hpa.targetCPUUtilizationCPU Utilization threshold value to scale up CORE POD1000m
hpa.targetMemoryUtilizationMemory Utilization threshold value to scale up CORE POD4000Mi
core.resourcesCPU/Memory resource requests/limits for CORE POD{}
lic.resourcesCPU/Memory resource requests/limits for lic POD{}
kad.resourcesCPU/Memory resource requests/limits for kad POD{}
redis.resourcesCPU/Memory resource requests/limits for redis POD{}
sharding.resourcesCPU/Memory resource requests/limits for sharding POD{}
helper.resourcesCPU/Memory resource requests/limits for helper container{}
core.livenessProbeliveness probe for CORE PODFor Default values please refer this
core.readinessProbeReadiness probe for CORE PODFor Default values please refer this
redis.livenessProbeliveness probe for REDIS PODFor Default values please refer this
redis.readinessProbeReadiness probe for REDIS PODFor Default values please refer this
lic.livenessProbeliveness probe for LIC PODFor Default values please refer this

Note: You can use the values.yaml file packaged in the chart. This file contains the default configuration values for the chart.

Deploy adm-agent with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has adm-agent on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartadm-agent is pinned at v141.37.40 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply