This document describes how to use the local image cache mode to accelerate ack-onepilot integration for Java applications.
Background
By default, the init-container injected by the ack-onepilot component dynamically pulls agent packages based on rules. This approach maintains flexibility for application integration. However, in some scenarios, dynamically pulling agent packages on the fly can cause issues:
In edge scenarios with poor network quality, the time required to pull the agent package can increase significantly. The pull operation might even fail due to issues such as timeouts.
Integrating many applications at the same time can increase the machine's input/output operations per second (IOPS). This consumes a large amount of the machine's I/O resources over a short period.
Prerequisites
ack-onepilot 5.1.0 or later.
The application is written in Java.
The agent version is 4.2.5 or later.
Procedure
The following example YAML file shows how to use the local image cache mode to accelerate ack-onepilot integration for a simple Java application in Kubernetes.
Install ack-onepilot and grant it the required resource access permissions. For more information, see Install the ARMS agent assistant (ack-onepilot).
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, find the cluster you want to manage and click its name. In the left navigation pane, choose .
On the Deployments page, for the target application, choose .
Click Create From YAML to create a new application.
In the YAML file, add the following
labelsat the spec.template.metadata level, and then click Update.labels: armsPilotAutoEnable: "on" armsPilotCreateAppName: "arms-k8s-demo-subcomponent" # Enable the local image cache mode. This is required. apsara.apm/enable-cached-agent: 'true' # In local image cache mode, specify the agent version. You can replace this with the required agent version. For a list of released agent versions, see the agent management documentation. aliyun.com/agent-version: 4.2.5On the Deployments page, click in the Actions column for the application to view its monitoring details.

> Edit YAML