Application Real-Time Monitoring Service (ARMS) provides comprehensive monitoring to help you understand the health of your applications. You can install the ARMS application monitoring component in a registered Kubernetes cluster to monitor the applications that run in the cluster.
Prerequisites
An ACK One registered cluster is created and an external Kubernetes cluster deployed in an on-premises data center is connected to the ACK One registered cluster.
Step 1: Install the ARMS application monitoring component
Install using onectl
Install onectl on your on-premises machine. For more information, see Use onectl to manage registered clusters.
Run the following command to configure RAM permissions for the ack-onepilot component.
onectl ram-user grant --addon ack-onepilotExpected output:
Ram policy ack-one-registered-cluster-policy-ack-onepilot granted to ram user **** successfully.Run the following command to install the ack-onepilot component.
onectl addon install ack-onepilotExpected output:
Addon ack-onepilot, version **** installed.
Install using the console
Configure RAM permissions. Before you install the component in the registered cluster, you must set an AccessKey in the connected cluster to obtain permissions to access Alibaba Cloud services.
Create a custom policy. The following policy document is required for the
ack-onepilotcomponent:{ "Version": "1", "Statement": [ { "Action": "arms:*", "Resource": "*", "Effect": "Allow" }, { "Action": "cms:*", "Resource": "*", "Effect": "Allow" } ] }Grant permissions to the RAM user. Attach the custom policy that you created in the previous step to the RAM user.
Create an AccessKey pair for the RAM user.
WarningWe recommend that you configure AccessKey pair-based policies for network access control, limiting AccessKey invocation sources to trusted network environments to enhance AccessKey security.
Use the AccessKey to create a Secret resource named
alibaba-addon-secretin the registered cluster.Run the following command to create the Secret for the
ack-onepilotcomponent.NoteBefore you run the command, replace the
access-key-idandaccess-key-secretparameters with the AccessKey ID and AccessKey secret that you created in the previous step.kubectl -n ack-onepilot create secret generic alibaba-addon-secret --from-literal='access-key-id=<your AccessKey ID>' --from-literal='access-key-secret=<your AccessKey Secret>'
Install the
ack-onepilotcomponent.Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, find the one you want to manage and click its name. In the left navigation pane, click Add-ons.
On the Add-ons page, click the Logs and Monitoring tab, find the ack-onepilot component, and click Install in the lower-right corner.
In the Install ack-onepilot dialog box, set the configuration items and click OK.
Step 2: Enable ARMS Application Monitoring for a Java application<YOUR-DEPLOYMENT-NAME>
On the Stateless page, click ARMS Console in the Actions column of the target application. You are redirected to the ARMS console to manage your application.
What to do next
Uninstall the agent for all applications in the cluster
Uninstall using onectl
Run the following command to uninstall the ack-onepilot component.
onectl addon uninstall ack-onepilotExpected output:
Addon ack-onepilot uninstalled.Restart the application pods.
Uninstall using the console
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, find the one you want to manage and click its name. In the left navigation pane, click Add-ons.
On the Add-ons page, click the Logs and Monitoring tab, find the ack-onepilot component, and click Uninstall in the lower-right corner.
In the dialog box that appears, click OK.
Restart the application pods.
Uninstall the agent for a specific application in the cluster
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of the target cluster. In the navigation pane on the left, choose .
On the Deployments page, in the Actions column of the target application, choose
> Edit YAML. In the Edit YAML dialog box, delete the labelsthat you added in Step 2, and then click Update.Restart the application pods.