If your business runs in a self-managed Kubernetes cluster or in a third-party cloud provider's container environment such as Volcengine or Tencent Cloud, you can deploy runtime application self-protection for workloads by using the Alibaba Cloud ack-onepilot component to achieve application-level real-time attack detection and protection.
Scope
-
K8s cluster environment:
-
Self-managed K8s clusters and third-party cloud provider container environments such as Volcengine and Tencent Cloud.
-
Kubernetes cluster version 1.18 or later.
-
The cluster can connect to the Internet, or connectivity between an Alibaba Cloud VPC and the cluster is established through Cloud Enterprise Network (CEN) or other methods.
-
-
Operating machine tools: The operating machine has kubectl and helm command-line tools installed and can manage the target K8s cluster.
-
Account and permissions: If you use a RAM user to perform operations, grant the
AliyunARMSFullAccessandAliyunSTSAssumeRoleAccesspermissions, and generate theAccessKeyID andAccessKeySecret. -
Prerequisites: You have connected OpenClaw to Agent Security Center. Ensure that OpenClaw is installed on the server and Node.js version ≥ 22.
Obtain PilotAmsKey
-
Access the Security Center console - Agent Security Center - Agent Overview. At the top of the left side of the page, select the region where the asset to be protected is located: Chinese Mainland or Outside Chinese Mainland.
-
On the Agent Overview page, in the Connected Platforms area for OpenClaw, click Enable Protection Now.
-
In the Enable OpenClaw Real-Time Protection dialog box, select Manual Installation.
-
In the Execute Installation Command area, copy and save the parameter value after
--keyin the installation command. This value is thePilotAmsKey.
Install the ack-onepilot component
ack-onepilot must be deployed once in each cluster. If you have multiple clusters, repeat Steps 2 through 5 for each cluster. Step 1 is a one-time action on the operating machine and does not need to be repeated.
Step 1: Install Helm 3
If Helm 3 is already installed, you can skip this step.
curl -fsSL https://get.helm.sh/helm-v3.14.0-linux-amd64.tar.gz | tar xz
sudo mv linux-amd64/helm /usr/local/bin/helm
helm version
Step 2: Download ack-onepilot
Download the installation package from the following address. The latest version is subject to the official Alibaba Cloud release. The version must be 5.2.1 or later. The following command uses 5.2.1 as an example. Replace 5.2.1 with the latest version number when you run the command.
wget 'https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts-incubator/ack-onepilot-5.2.1.tgz'
tar xvf ack-onepilot-5.2.1.tgz
Step 3: Edit values.yaml
Edit the ack-onepilot/values.yaml file and configure the following parameters. For more information, see ack-onepilot.
|
Parameter |
Description |
|
|
The image registry address for ack-onepilot. Determine the address based on your actual environment. |
|
|
A custom cluster ID. We recommend the format |
|
|
The |
|
|
The |
|
|
The UID of the Alibaba Cloud primary account. |
Step 4: Install ack-onepilot
Run the following command to install ack-onepilot in the cluster:
helm upgrade --install ack-onepilot ./ack-onepilot \
--namespace ack-onepilot --create-namespace
Step 5: Verify the component
Run the following command to confirm that all ack-onepilot Pods are in the Running state.
kubectl get pods -n ack-onepilot
# All ack-onepilot Pods should be in the Running state.
Deploy to workloads
ack-onepilot identifies specific labels on the workload Pod template and automatically injects probes into matching Pods. To enable protection for a target workload, modify its YAML and add the following labels to spec.template.metadata.labels.
Parameter description
|
Label |
Description |
|
|
Set to |
|
|
The key obtained from the Security Center console. For information about how to obtain the key, see Obtain PilotAmsKey. |
|
|
The application language. Supported values: |
|
|
The region for data reporting.
|
Configuration examples
Node.js application
spec:
template:
metadata:
labels:
PilotAutoEnable: "on"
PilotAmsKey: "<YOUR_AMS_KEY>"
PilotLang: "nodejs"
PilotRegion: "cn"
Python application
spec:
template:
metadata:
labels:
PilotAutoEnable: "on"
PilotAmsKey: "<YOUR_AMS_KEY>"
PilotLang: "python"
PilotRegion: "cn"
Apply changes
-
After you modify the workload YAML, run the following command to apply the changes to the cluster:
kubectl apply -f <YOUR-WORKLOAD>.yaml -
If the workload is already running, you need to restart the Pods to make the probes take effect:
kubectl rollout restart deployment/<YOUR-DEPLOYMENT> -n <namespace>
View and handle risk events
After the plug-in is installed, Agent Security Center automatically detects and defends against risks such as prompt injection attacks and malicious URL access in container applications. To view protection events, go to Agent Security Center - Agent Risks to view real-time protection attack interception records and risk event details.
Billing
Starting August 25, 2026, the defense plug-in provided by Agent Security Center will be billed as a commercial service. For more information, see Agent Security Center defense capabilities official commercial billing announcement.