Manually control agent versions

Updated at:

The ack-onepilot component automatically updates the ARMS agent in Kubernetes environments. To prevent automatic updates, you can pin the agent to a specific version, test it in a non-production environment, and then gradually roll it out across your applications.

Method 1 (Recommended): Pin the agent version

Required ack-onepilot version

ack-onepilot version 3.0.17 or later.

You can check the ack-onepilot version on the Component Management page for your cluster in the ACK console. If the component is outdated, click Upgrade to update it.

To pin the agent to a specific version, add a label to your application's YAML file. This label overrides automatic ARMS updates and locks the application to the specified version.

  1. In the ARMS console, go to the Application > Agent Management > Agent Release Notes tab to find supported agent versions. We recommend using the latest version.

    This page lists each agent version with its Release Time, Expiration Time, Agent Status, and Description. To obtain an agent, click the Download link for the desired version.

  2. On the Agent Online Status tab, check the agent version your application is currently using. Note this version for potential rollbacks.

  3. Set the agent version for the application.

    Note

    If you configure the agent version using both a YAML label and EDAS settings, the EDAS settings take precedence.

    • For standard Kubernetes applications, modify the YAML file. Add the aliyun.com/agent-version label to the labels block to specify the agent version. After you click Update, the application automatically restarts to apply the change.

      This change affects only the current application. Repeat this step for each application that you want to pin to a specific version.

          template:
            metadata:
              labels:
                app: mall-gateway
              armsPilotAutoEnable: 'on'
              armsPilotCreateAppName: test
              aliyun.com/agent-version: 3.1.4

      If your ack-onepilot version is 3.3.0 or later, you can enable progressive updates for safer, controlled rollouts. Add the following label under aliyun.com/agent-version:

      aliyun.com/enable-progressive-update: 'true'
      Note
      • When you redeploy a workload, such as a Deployment or StatefulSet, in Kubernetes, the progressive update feature upgrades the agent on only one or two instances to the version specified by aliyun.com/agent-version. The agent version for the remaining instances stays the same.

      • If an application workload has fewer than three replicas, the progressive update feature is not triggered. When you specify an agent version, the agent will not be upgraded on any replica. Therefore, do not enable progressive updates in this scenario.

    • For applications deployed in Kubernetes clusters using EDAS, you can specify the agent version on the Advanced Settings tab within the Monitoring and Governance Configurations section during deployment. For more information, see Configure the agent version for monitoring and microservices governance.

      Note

      To adjust the selectable agent versions, contact EDAS technical support.

    • If you deploy a Kubernetes application using the EDAS API, use the CustomAgentVersion parameter in the InsertK8sApplication or DeployK8sApplication operations to specify the agent version. For more information, see Deploy a Kubernetes application.

  4. After you verify that the specified agent version works as expected in your test environment, you can gradually update the agent for your other applications.

    If the new agent version causes issues, roll back to the previous version by repeating the modification process described in Step 3.

Method 2: Request a version lock

If your ack-onepilot component is older than version 3.0.17, or if manually updating YAML files is impractical, contact technical support to lock your agent version. This method also helps when upgrading outdated or unsupported agents to the latest stable version.

  • Select a test application in your test environment to verify the upgrade. Contact ARMS technical support to update the locked agent version to the latest version. After the configuration is complete, restart the application and run verification tests.

  • After validating the new version in your test environment, contact ARMS technical support again. Provide a list of production clusters, grouped into batches for a phased rollout. The support team will then apply the version lock to your clusters one batch at a time. As each batch is updated, restart the corresponding applications to complete the upgrade.