Updated on 2025-08-05 GMT+08:00

Managing Sermant Injector

Sermant Agent is automatically mounted to container-deployed Spring Cloud applications through the Sermant Injector plug-in. These applications are connected to the ServiceComb engine or registry/configuration center with security authentication disabled through Sermant Agent. For details about Sermant Agent, see Sermant-agent User Manual.

Compared with Spring Cloud Huawei, Sermant Agent allows you to access the engine and use functions such as application registry and discovery, full-link dark launch, graceful startup and shutdown, and label routing without modifying application code. However, microservice governance is not supported.

Use either Sermant Agent or Spring Cloud Huawei to connect Spring Cloud applications to the exclusive ServiceComb engine or registry/configuration center. Do not use them at the same time to avoid conflicts.

Before using Sermant Agent to connect a Spring Cloud application to an exclusive ServiceComb engine or registry/configuration center, Installing Sermant Injector.

Prerequisites

  • A CCE cluster later than 1.15 has been bound in the environment. For details, see Binding a Cluster.
  • If the bound CCE cluster has the cse namespace, the namespace cannot contain the configuration item sermant-injector, key sermant-injector-secret, workload sermant-injector, or service sermant-injector. Otherwise, the plug-in installation will fail.
  • An exclusive ServiceComb engine 2.4.0 or later or registry/configuration center with security authentication disabled has been managed in the environment. For details, see Managing Basic Resources.

Installing Sermant Injector

  1. Log in to ServiceStage.
  2. Choose Environment Management. The Environment Management page is displayed.
  3. Click the target environment. The Overview page is displayed.
  4. Choose Plug-in Management.
  5. Select Sermant Injector under Addons.

    • For a non-HA environment, click install and then go to 6.
    • For an HA environment, select the AZ where the CCE cluster on which the Sermant Injector plug-in is to be installed is located, click install, and go to 6.

  6. Set parameters by referring to the following table.

    Parameter

    Description

    CCE Cluster

    By default, a bound CCE cluster in the current environment is selected.

    Server Type

    Select the same CPU architecture as the master node of the selected CCE cluster.

    • x86_64
    • AArch64

    Associated Microservice Engine

    Select the exclusive ServiceComb engine or registry/configuration center for installing the plug-in.

  7. Click OK.

    • After the Sermant Injector plug-in is successfully installed, the content listed in the following table is created.

      Name

      Description

      Namespace

      Create a namespace named cse in the CCE cluster selected in 6.

      NOTE:

      If the CCE cluster selected in 6 already has a namespace named cse, the namespace will be reused when the Sermant Injector plug-in is installed.

      Configuration item

      In namespace cse of the CCE cluster selected in 6, create a configuration item named sermant-injector.

      Key

      In namespace cse of the CCE cluster selected in 6, create a key named sermant-injector-secret.

      Workload

      In namespace cse of the CCE cluster selected in 6, create a workload named sermant-injector.

      Service

      In namespace cse of the CCE cluster selected in 6, create a service named sermant-injector.

    • If the Sermant Injector plug-in fails to be installed, try again by referring to Reinstalling Sermant Injector.
    • If a CCE cluster with the Sermant Injector plug-in installed is bound to another environment, manage the exclusive ServiceComb engine or registry/configuration center associated with the Sermant Injector plug-in in that environment. Otherwise, the Sermant Injector plug-in will be unavailable in that environment.

      For details about how to manage exclusive ServiceComb engines, see Managing Basic Resources.

Upgrading Sermant Injector

Upgrade the Sermant Injector plug-in to the latest version.

Sermant Agent cannot be mounted during the Sermant Injector load upgrade. As a result, the service instances restarted during this period may fail to be connected to the ServiceComb engine or registry/configuration center.

  1. Log in to ServiceStage.
  2. Choose Environment Management. The Environment Management page is displayed.
  3. Click the target environment. The Overview page is displayed.
  4. Choose Plug-in Management.
  5. Select Sermant Injector under Addons.

    • For a non-HA environment, click Upgrade.
    • For an HA environment, click the AZ tab of the CCE cluster where the Sermant Injector plug-in is to be upgraded, and click Upgrade.

  6. In the displayed dialog box, click OK.

Restarting the Sermant Injector Load

Restart the Sermant Injector load.

Sermant Agent cannot be mounted during the Sermant Injector load restart. As a result, the service instances restarted during this period may fail to be connected to the ServiceComb engine or registry/configuration center.

  1. Log in to ServiceStage.
  2. Choose Environment Management. The Environment Management page is displayed.
  3. Click the target environment. The Overview page is displayed.
  4. Choose Plug-in Management.
  5. Select Sermant Injector under Addons.

    • For a non-HA environment, click Restart.
    • For an HA environment, click the AZ tab of the CCE cluster where the Sermant Injector plug-in is to be restarted, and click Restart.

  6. In the displayed dialog box, click OK.

Reinstalling Sermant Injector

Reinstall Sermant Injector if it fails to be installed.

  1. Log in to ServiceStage.
  2. Choose Environment Management. The Environment Management page is displayed.
  3. Click the target environment. The Overview page is displayed.
  4. Choose Plug-in Management.
  5. Select Sermant Injector under Addons.

    • For a non-HA environment, click Redeploy.
    • For an HA environment, click the AZ tab of the CCE cluster where the Sermant Injector plug-in fails to be installed, and click Redeploy.

Deleting Sermant Injector

After the installed Sermant Injector plug-in is deleted, Sermant Agent cannot be used to connect microservice instances to the ServiceComb engine or registry/configuration center.

If the Sermant Injector plug-in is deleted, the content listed in the following table is deleted.

Name

Description

Configuration item

Configuration item sermant-injector created in namespace cse of the CCE cluster selected during Installing Sermant Injector. For details about configuration items, see Managing Configuration Items.

Key

Secret sermant-injector-secret created in namespace cse of the CCE cluster selected during Installing Sermant Injector. For details about secrets, see Managing Secrets.

Workload

Workload sermant-injector created in namespace cse of the CCE cluster selected during Installing Sermant Injector. For details about workloads, see .

Service

Service sermant-injector created in namespace cse of the CCE cluster selected during Installing Sermant Injector. For details about services, see .

  1. Log in to ServiceStage.
  2. Choose Environment Management. The Environment Management page is displayed.
  3. Click the target environment. The Overview page is displayed.
  4. Choose Plug-in Management.
  5. Select Sermant Injector under Addons.

    • For a non-HA environment, click Delete.
    • For an HA environment, click the AZ tab of the CCE cluster where the Sermant Injector plug-in is to be deleted, and click Delete.

  6. Click OK.