Install a Remote Network Agent

Install a Remote Network Agent in your Kubernetes cluster.

Before you begin

  • If you are coming to this guide from the Add a New Remote Network Agent page in the UI, you have your RNA name (Agent Identifier), Client ID, and Client Secret. Do not close the pop-up window in the UI until you have completed RNA installation. The credentials in the pop-up window are deleted if you close the window before the RNA has connected.
  • You have created client credentials. See the Create Client Credentials guide for instructions.
  • You have access to a Kubernetes cluster and have installed kubectl.
  • You have installed Helm(v3), which is used to install the Remote Network Agent.

Install the Remote Network Agent

  1. In your terminal, configure your kubectl context to connect to the cluster where you want to deploy your app:

    kubectl config set-context <NAME>
  2. Create the namespace for the RNA:

    kubectl create ns armory-rna
  3. Create secrets from your Client ID and Client Secret:

    kubectl --namespace armory-rna create secret generic rna-client-credentials --type=string --from-literal=client-secret=<your-client-secret> --from-literal=client-id=<your-client-id>

    The examples use Kubernetes secrets to encrypt the value. You supply the encrypted values in the Helm command to install the RNA.

  4. Install the RNA using the Helm chart.

    For most scenarios, you install one RNA per cluster. Use the agentIdentifier parameter to give each RNA a unique name. When you deploy your app, you specify which RNA to use, so Armory recommends creating a meaningful name that identifies the cluster.

    helm upgrade --install armory-rna armory/remote-network-agent \
        --set agentIdentifier=<rna-name> \
        --set 'clientId=encrypted:k8s!n:rna-client-credentials!k:client-id' \
        --set 'clientSecret=encrypted:k8s!n:rna-client-credentials!k:client-secret' \
        --namespace armory-rna

    The encrypted values for clientId and clientSecret reference the Kubernetes secrets you generated in an earlier step.

    For advanced use cases such as proxy configurations, custom annotations, labels, or environment variables, see the values.yaml for the RNA. For information about using a values file, see the Helm documentation.

  5. You can go to the Agents page in the CD-as-a-Service Console to verify that your RNA has been installed and is communicating with CD-as-a-Service. If you do not see the RNA, check the cluster logs to see if the RNA is running.

Last modified May 29, 2022: (975089c8)