Upgrade the Cluster Agent

Created byLiza Shibuon Jul 08, 2024

This page describes how to upgrade the Cluster Agent using:

  • Kubernetes CLI, or
  • Cluster Agent Helm Chart

To install, seeInstall the Cluster Agent.

Note: You must download the latest bundle and use only the packaged YAML files.

Upgrade the Cluster Agent Using Kubernetes CLI

  1. Download the target version of the Cluster Agent bundle from theDownloads portal.
  2. Unzip the bundle and change the directory to the unzipped folder.
    unzip appdynamics-cluster-agent-alpine-linux-<version>.zip
    cd appdynamics-cluster-agent-alpine-linux-<version>
  3. Update the cluster-agent.yaml.
  4. Update the image tag to add the version of the downloaded Cluster Agent bundle (for example, 25.2.0):
    apiVersion: cluster.appdynamics.com/v1alpha1
    kind: Clusteragent
    metadata:
    name: k8s-cluster-agent
    namespace: appdynamics
    spec:
    appName: "<app-name>"
    controllerUrl: "http://<appdynamics-controller-host>:8080"
    account: "<account-name>"
    # docker image info
    image: "docker.io/appdynamics/cluster-agent:25.2.0"
    serviceAccountName: appdynamics-cluster-agent
  5. Delete and re-create the Operator and Cluster Agent.
    kubectl delete -f cluster-agent.yaml
    kubectl delete -f cluster-agent-operator.yaml
    kubectl create -f cluster-agent-operator.yaml
    kubectl create -f cluster-agent.yaml

Upgrade the Cluster Agent Using the Helm Chart

The latest Cluster Agent Helm Chart is available at appdynamics-charts/cluster-agent

  1. Use helm get and helm show to determine if an upgrade is required to install the most recent Cluster Agent images from appdynamics-charts/cluster-agent .
    # which images are currently installed by my release?
    helm get all "<my-cluster-agent-helm-release>" -n appdynamics | grep -E 'agentTag|operatorTag'
    agentTag: 21.12.0
    operatorTag: 21.12.0
    # which images are available to install?
    helm show values appdynamics-charts/cluster-agent | grep -E 'agentTag|operatorTag'
    agentTag: 21.12.0
    operatorTag: 21.12.0
  2. To perform the upgrade, uninstall and re-install the Cluster Agent Helm Chart using the same namespace from the previous installation:
    1. Uninstall existing helm chart.
      helm uninstall "<cluster-agent-helm-release>" --namespace appdynamics
    2. Delete all the previously installed CustomResourceDefinition (CRDs) related to Splunk AppDynamics Agent by using these commands:
      kubectl get crd | grep appdynamics
      kubectl delete crd clusteragents.cluster.appdynamics.com
      kubectl delete crd infravizs.cluster.appdynamics.com
    3. Install Cluster Agent helm chart by using the same namespace.
      helm install -f ./ca1-values.yaml "<my-cluster-agent-helm-release>" appdynamics-charts/cluster-agent --namespace=appdynamics