All Products
Search
Document Center

Application Real-Time Monitoring Service:Manually connect an application to Application Monitoring eBPF Edition

Last Updated:Dec 24, 2025

Alibaba Cloud Application Monitoring eBPF Edition is an all-in-one observability product for Kubernetes clusters. After you manually install the Application Monitoring eBPF Edition component for a Kubernetes cluster, you can view its metrics, application traces, logs, and events.

Prerequisites

Note

Application Monitoring eBPF Edition is in public preview. During the public preview, you can use Alibaba Cloud Application Monitoring eBPF Edition for free. If you have any questions, you can join the Application Monitoring eBPF Edition support DingTalk group (Group ID: 35568145) for help.

Connection instructions

To connect your Kubernetes cluster to Application Monitoring eBPF Edition, you must install the Application Monitoring eBPF Edition component for the cluster.

Before installation, check whether the target cluster has an ARMS Addon Token. If an ARMS Addon Token exists, ARMS performs passwordless authorization, and you can use Application Monitoring eBPF Edition after the component is installed. If an ARMS Addon Token does not exist, a permission error occurs. In this case, you must manually add the access policies for ARMS and Tracing Analysis. The following sections describe how to check for an ARMS Addon Token and manually add access policies.

Check whether ARMS Addon Token exists in a cluster

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters. On the Clusters page, click the name of the cluster to go to the cluster details page.

  2. In the left-side navigation pane, choose Configurations > Secrets. In the upper part of the page, select kube-system from the Namespace drop-down list and check whether addon.arms.token is displayed on the Secrets page.

Manually add permission policies

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters. On the Clusters page, click the name of the cluster.

  2. On the Basic Information tab of the Cluster Information page, click the link next to Worker RAM Role in the Cluster Resources section.

  3. On the page that appears, click Grant Permission on the Permissions tab.

  4. In the Grant Permission panel, add the following policies and click Grant permissions.

    • AliyunTracingAnalysisFullAccess: full access to Managed Service for OpenTelemetry.

    • AliyunARMSFullAccess: full access to ARMS.

Note
  • ACK managed clusters: Some ACK managed clusters may not have an ARMS Addon Token. For these clusters, you must first check whether an ARMS Addon Token exists. If it does not, you must manually grant permissions.

  • ACK dedicated clusters: By default, ACK dedicated clusters do not support ARMS Addon Tokens. Therefore, you must manually grant permissions.

Install the Application Monitoring eBPF Edition component

Install the component for an existing application

If the Application Monitoring eBPF Edition component is already installed in your application, go to the Operations > Add-ons page for the target cluster in the Container Service Management Console. On this page, check whether the version of the ack-arms-cmonitor component is 4.0.0 or later. If not, click Upgrade to upgrade the component to the latest version.

  1. Log on to the Container Service for Kubernetes (ACK) console. On the Clusters page, click the name of the target cluster.

  2. In the navigation pane on the left, choose Operations Management > Cluster Topology.

  3. On the Cluster Topology page, click Start Installation. The ACK console automatically installs the Application Monitoring eBPF Edition component.

    Note

    The default namespace is arms-prom.

  4. If you use an ACK dedicated cluster, update the AccessKey pair configuration.

    1. In the navigation pane on the left, choose Applications > Helm.

    2. Find arms-cmonitor and click Update. Set accessKey and accessKeySecret to the AccessKey ID and AccessKey secret of your Alibaba Cloud account. For more information, see Obtain an AccessKey pair.

      Important

      Confirm that the Alibaba Cloud account has the AliyunARMSFullAccess and AliyunSTSAssumeRoleAccess permissions.

    3. Click OK.

Install the component when you create an application

  1. Log on to the Container Service for Kubernetes (ACK) console. On the Clusters page, find the target cluster. In the Actions column, click Application Management.

  2. On the Stateless page, click Create with YAML.

  3. Select Sample Template. In the Template field, which is in YAML format, add the following labels under the spec.template.metadata level.

    labels:
      armseBPFAutoEnable: "on"
      armseBPFCreateAppName: "<your-deployment-name>"    # Replace <your-deployment-name> with your application name.

    The following code provides a complete sample YAML template for creating a stateless (Deployment) application and enabling ARMS Application Monitoring eBPF Edition:

    Expand to view the complete sample YAML file

    apiVersion: v1
    kind: Namespace
    metadata:
      name: arms-demo
    ---
    apiVersion: apps/v1 # for versions before 1.8.0 use apps/v1beta1
    kind: Deployment
    metadata:
      name: arms-springboot-demo
      namespace: arms-demo
      labels:
        app: arms-springboot-demo
    spec:
      replicas: 2
      selector:
        matchLabels:
          app: arms-springboot-demo
      template:
        metadata:
          labels:
            app: arms-springboot-demo
            armseBPFAutoEnable: "on"
            armseBPFCreateAppName: "arms-k8s-demo"
        spec:
          containers:
            - resources:
                limits:
                  cpu: 0.5
              image: registry.cn-hangzhou.aliyuncs.com/arms-docker-repo/arms-springboot-demo:v0.1
              imagePullPolicy: Always
              name: arms-springboot-demo
              env:
                - name: SELF_INVOKE_SWITCH
                  value: "true"
                - name: COMPONENT_HOST
                  value: "arms-demo-component"
                - name: COMPONENT_PORT
                  value: "6666"
                - name: MYSQL_SERVICE_HOST
                  value: "arms-demo-mysql"
                - name: MYSQL_SERVICE_PORT
                  value: "3306"
    ---
    apiVersion: apps/v1 # for versions before 1.8.0 use apps/v1beta1
    kind: Deployment
    metadata:
      name: arms-springboot-demo-subcomponent
      namespace: arms-demo
      labels:
        app: arms-springboot-demo-subcomponent
    spec:
      replicas: 2
      selector:
        matchLabels:
          app: arms-springboot-demo-subcomponent
      template:
        metadata:
          labels:
            app: arms-springboot-demo-subcomponent
            armseBPFAutoEnable: "on"
            armseBPFCreateAppName: "arms-k8s-demo-subcomponent"
        spec:
          containers:
            - resources:
                limits:
                  cpu: 0.5
              image: registry.cn-hangzhou.aliyuncs.com/arms-docker-repo/arms-springboot-demo:v0.1
              imagePullPolicy: Always
              name: arms-springboot-demo-subcomponent
              env:
                - name: SELF_INVOKE_SWITCH
                  value: "false"
                - name: MYSQL_SERVICE_HOST
                  value: "arms-demo-mysql"
                - name: MYSQL_SERVICE_PORT
                  value: "3306"
    ---
    apiVersion: v1
    kind: Service
    metadata:
      labels:
        name: arms-demo-component
      name: arms-demo-component
      namespace: arms-demo
    spec:
      ports:
        # the port that this service should serve on
        - name: arms-demo-component-svc
          port: 6666
          targetPort: 8888
      # label keys and values that must match to receive traffic for this service
      selector:
        app: arms-springboot-demo-subcomponent
    ---
    apiVersion: apps/v1 # for versions before 1.8.0 use apps/v1beta1
    kind: Deployment
    metadata:
      name: arms-demo-mysql
      namespace: arms-demo
      labels:
        app: mysql
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: mysql
      template:
        metadata:
          labels:
            app: mysql
        spec:
          containers:
            - resources:
                limits:
                  cpu: 0.5
              image: registry.cn-hangzhou.aliyuncs.com/arms-docker-repo/arms-demo-mysql:v0.1
              name: mysql
              ports:
                - containerPort: 3306
                  name: mysql
    ---
    apiVersion: v1
    kind: Service
    metadata:
      labels:
        name: mysql
      name: arms-demo-mysql
      namespace: arms-demo
    spec:
      ports:
        # the port that this service should serve on
        - name: arms-mysql-svc
          port: 3306
          targetPort: 3306
      # label keys and values that must match to receive traffic for this service
      selector:
        app: mysql

References

After you connect your application to Application Monitoring eBPF Edition, you can view key metrics, upstream and downstream dependent components, and topology graphs for your ACK cluster application. For more information, see Application details.