Managing UniAgents and ICAgents in K8s Clusters
Kubernetes cluster management allows you to manage the lifecycle of UniAgents and ICAgents on hosts in your purchased CCE clusters, self-built K8s clusters, other regions' CCE clusters, and other cloud vendors' K8s clusters, for example, batch installation, upgrade, and uninstall.
Prerequisites
- You have purchased CCE clusters and nodes. For details, see Buying a CCE Standard/Turbo Cluster and Creating a Node.
Managing Clusters Connected to AOM
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Settings > Global Settings.
- In the navigation pane, choose Collection Settings > K8s Clusters.
- On the K8s Clusters page, you can perform the following operations:
- On the CCE Cluster tab page, manage the CCE clusters connected to AOM.
- View the CCE clusters connected to AOM. Enter a CCE cluster name or ID in the search box to search for a cluster. Fuzzy match is supported.
- To collect container logs and output them to AOM 1.0, enable Output to AOM 1.0. (This function is supported only when ICAgent 5.12.133 or later is installed.) You are advised to collect container logs and output them to LTS instead of AOM 1.0. For details, see Ingesting CCE Application Logs to LTS.
- Install, upgrade, or uninstall the UniAgents and ICAgents in CCE clusters. For details, see Managing the UniAgents of CCE Clusters and Managing ICAgents in CCE Clusters.
- If a running UniAgent has a new version, Upgradable will be displayed in the UniAgent Version column. You can upgrade the UniAgent by referring to Managing the UniAgents of CCE Clusters.
- If an installed ICAgent has a new version, Upgradable will be displayed in the Plug-ins Installed column. You can upgrade the ICAgent by referring to Managing ICAgents in CCE Clusters.
- On the Self-built K8s Clusters tab page, manage K8s clusters.
- View the created K8s clusters. Enter a K8s cluster name or ID in the search box to search for a cluster. Fuzzy match is supported.
- Click + next to the search box. In the displayed dialog box, enter required information to create a K8s cluster.
Table 1 Parameters for creating a K8s cluster Parameter
Description
Example
Name
Enter 1 to 50 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. Do not start with a period or underscore, or end with a period.
k8s-test
ID
Enter 1 to 50 characters. Only lowercase letters, digits, and hyphens (-) are allowed. Do not start or end with a hyphen.
k8s-test123
Associated Host Group
You can create a new host group or use an existing host group.
- Create: A host group whose name is k8s-{cluster name} and custom identifier is k8s-log-{cluster ID} is automatically created.
You need to add the host to the created host group and set the host identifier to k8s-log-{cluster ID}. For details, see Creating a Host Group (Custom Identifier).
- Use existing: Select an existing host group. You are advised to select the host group whose custom identifier is k8s-log-{cluster ID} to manage the servers in the K8s cluster.
Select a host group.
- Create: A host group whose name is k8s-{cluster name} and custom identifier is k8s-log-{cluster ID} is automatically created.
- Click
next to the K8s cluster name and choose Edit or Delete to modify or delete the cluster. - Install, upgrade, or uninstall the UniAgent and ICAgent in the K8s cluster. For details, see Managing UniAgents and ICAgents in Self-built K8s Clusters.
- If a running UniAgent has a new version, Upgradable will be displayed in the UniAgent Version column. You can upgrade the UniAgent if needed. For details, see Managing the UniAgents of CCE Clusters.
- If an installed ICAgent has a new version, Upgradable will be displayed in the Plug-ins Installed column. You can upgrade the ICAgent if needed. For details, see Managing ICAgents in CCE Clusters.
- On the CCE Cluster tab page, manage the CCE clusters connected to AOM.
Managing the UniAgents of CCE Clusters
You can install, upgrade, and uninstall UniAgent on hosts in CCE clusters connected to AOM.
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Settings > Global Settings.
- On the Global Settings page, choose Collection Settings > K8s Clusters in the navigation pane.
- On the displayed page, click the CCE Cluster tab.
- Select the target cluster from the cluster list and perform the operations listed in the following table if needed.
Table 2 Operations on UniAgents Operation
Description
Install UniAgent
- Click Install UniAgent and select a UniAgent version to install.
- Click OK. The UniAgent of the specified version and the ICAgent of the latest version will be installed on all hosts of the cluster.
During UniAgent installation, the system adds the custom identifier k8s-log-{cluster ID} to the custom_tag file in the /opt/cloud/lts directory on the host in overwrite mode. The hosts in the cluster will be automatically grouped to the host group with the same identifier.
Upgrade UniAgent
- Click Upgrade UniAgent and select a UniAgent version to upgrade. (If the UniAgent version is later than 1.1.9, the UniAgent cannot be rolled back to 1.1.9 or an earlier version.)
- Click OK. The UniAgents on all hosts of the cluster will be upgraded to the version you specified.
During UniAgent upgrade, the system adds the custom identifier k8s-log-{cluster ID} to the custom_tag file in the /opt/cloud/lts directory on the host in overwrite mode. The hosts in the cluster will be automatically grouped to the host group with the same identifier.
Uninstall UniAgent
- Click Uninstall UniAgent. On the displayed page, click OK. The UniAgents will be uninstalled from all hosts of the cluster. ICAgents will also be uninstalled if there are any.
Only the UniAgents installed on the K8s Clusters page can be uninstalled here.
Managing ICAgents in CCE Clusters
You can install, upgrade, and uninstall ICAgents on hosts in CCE clusters connected to AOM.
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Settings > Global Settings.
- On the Global Settings page, choose Collection Settings > K8s Clusters in the navigation pane.
- On the displayed page, click the CCE Cluster tab.
- Select the cluster where the target ICAgent is located and then click Plug-in Operations.
Plug-in operations are supported only when your UniAgent has been installed through the K8s Clusters page. If your UniAgent is not installed through the K8s Clusters page, click Install UniAgent to install the UniAgent on the hosts in your CCE cluster before performing plug-in operations.
- In the displayed dialog box, select the operations listed in the following table if needed.
Table 3 Plug-in operations Operation
Description
Install
- Select the Install operation and ICAgent plug-in. (Only the ICAgent can be installed.)
- Click OK. The ICAgent of the latest version will then be installed on all hosts that meet criteria.
During ICAgent installation, the system adds the custom identifier k8s-log-{cluster ID} to the custom_tag file in the /opt/cloud/lts directory on the host in overwrite mode. The hosts in the cluster will be automatically grouped to the host group with the same identifier.
Upgrade
- Select the Upgrade operation and ICAgent plug-in. (Only the ICAgent can be upgraded.)
- Click OK. The ICAgent on all hosts that meet criteria will then be upgraded to the latest version.
During ICAgent upgrade, the system adds the custom identifier k8s-log-{cluster ID} to the custom_tag file in the /opt/cloud/lts directory on the host in overwrite mode. The hosts in the cluster will be automatically grouped to the host group with the same identifier.
Uninstall
- Select the Uninstall operation and ICAgent plug-in. (Only the ICAgent can be uninstalled.)
- Click OK. The ICAgent will then be uninstalled from all hosts that meet criteria.
Managing UniAgents and ICAgents in Self-built K8s Clusters
You can run commands to install, upgrade, and uninstall a UniAgent and ICAgent on a host in a self-built K8s cluster.
Prerequisites:
- Ensure that Helm v3 has been installed on the target host in the self-built K8s cluster.
- Ensure that kubectl has been configured for the Kubernetes cluster.
- Log in to the AOM 2.0 console.
- In the navigation pane, choose Settings > Global Settings.
- On the Global Settings page, choose Collection Settings > K8s Clusters in the navigation pane.
- On the displayed page, click the Self-built K8s Clusters tab.
- Locate the target cluster and perform the operations listed in the table.
Table 4 Operations Operation
Description
Install UniAgent
- Click Install UniAgent.
- On the Install UniAgent page, configure the following information:
- Server Location: Only Current region is supported.
- Self-built K8s Clusters: Select the target K8s cluster.
- UniAgent Version: Select the UniAgent version to be installed.
- Install ICAgent together (recommended): Select this option to install the ICAgent during UniAgent installation if needed.
- Click Copy to copy the installation command.
If Install ICAgent together (recommended) has been selected, you can first obtain the access code ID and value on the Authentication page, and replace the access code ID and value in the installation command. You can also click Copy on the right to copy the installation command, log in to the host, run this command, and enter the access code ID and value as prompted.
- Use a remote login tool to log in to a host in the K8s cluster and run the copied installation command as the root user. UniAgents can then be installed on other hosts in the cluster.
During UniAgent installation, the system adds the custom identifier k8s-log-{cluster ID} to the custom_tag file in the /opt/cloud/lts directory on the host in overwrite mode. The hosts in the cluster will be automatically grouped to the host group with the same identifier.
Upgrade UniAgent
- Click Upgrade UniAgent.
- On the Upgrade UniAgent page, configure the following information:
- Server Location: Only Current region is supported.
- Self-built K8s Clusters: Select the target K8s cluster.
- UniAgent Version: Select the target UniAgent version.
- Upgrade ICAgent together: Select this option if needed.
- Click Copy to copy the upgrade command.
- Use a remote login tool to log in to a host in the K8s cluster and run the copied upgrade command as the root user. UniAgents can then be upgraded on other hosts in the cluster.
During UniAgent upgrade, the system adds the custom identifier k8s-log-{cluster ID} to the custom_tag file in the /opt/cloud/lts directory on the host in overwrite mode. The hosts in the cluster will be automatically grouped to the host group with the same identifier.
Uninstall UniAgent
- Click Uninstall UniAgent.
- On the Uninstall UniAgent page, configure the following information:
- Server Location: Only Current region is supported.
- Self-built K8s Clusters: Select the target K8s cluster.
- Uninstall ICAgent together: Select this option if needed.
- Click Copy to copy the uninstall command.
- Use a remote login tool to log in to a host in the K8s cluster and run the copied uninstall command as the root user. UniAgents can then be uninstalled on other hosts in the cluster.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot