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

Installing an Agent

To install the agent for all nodes 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.

    If your servers are managed by enterprise projects, you can select the target enterprise project to view or operate the asset and detection information.

  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.

    It takes about 10 minutes to install the agent. Wait for 10 minutes and move the cursor to the Agent Installation Status column to view the status. You can click the value of uninstalled or installed nodes to go to the details page of the corresponding cluster.

    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.

    If your servers are managed by enterprise projects, you can select the target enterprise project to view or operate the asset and detection information.

  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.

Modifying On-premises Cluster Information

  • 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.

Follow-up Procedure

After the agent is installed, enable protection for the container. For details, see Enabling Container Protection.