Updated on 2024-01-16 GMT+08:00

Installing an Agent

To enable protection for all containers in a CCE cluster or an on-premises Kubernetes cluster, you can use the cluster agent management function to install the agent in the cluster. After this function is enabled, you do not need to manually install the agent on new nodes or pods added to the cluster.

Installing an Agent in a CCE Cluster

  1. Log in to the management console.
  2. In the upper left corner of the page, select a region, click , and choose Security & Compliance > HSS.
  3. In the navigation pane, choose Asset Management > Containers & Quota.
  4. Click the Cluster Agents tab and click CCE cluster.
  5. In the Operation column of a cluster, click Install Agent.

    You can also select multiple clusters and click Install Agent in the upper left corner of the list.

  6. In the dialog box that is displayed, click OK.

    The installation takes about 10 minutes. Check the installation status afterwards.

    Figure 1 Checking the agent installation status

Installing an Agent in an On-Premises Cluster

  1. Log in to the management console.
  2. In the upper left corner of the page, select a region, click , and choose Security & Compliance > HSS.
  3. In the navigation pane, choose Asset Management > Containers & Quota.
  4. Click the Cluster Agents tab and click On-premises cluster.
  5. Click Add On-Premises Cluster.
  6. In the dialog box that is displayed, enter cluster information and click Generate Command.

    In the dialog box that is displayed, click Save.

  7. Create a YAML file, for example, abcd.yaml, on the server where Kubernetes commands can be executed.
  8. Copy the generated command to abcd.yaml.
  9. Run the following command on the server to execute abcd.yaml and install the agent. This step takes about 10 minutes.

    kubectl apply -f abcd.yaml

  10. Return to the HSS console.
  11. In the navigation pane, choose Installation & Configuration.
  12. Click the Agents tab. If the agent status of the cluster server is Online, the agent has been installed.

Related Operations

  • To modify the on-premises cluster information or view commands, click Edit in its Operation column.
  • To remove the information about an on-premises cluster, click Remove in its Operation column.