All Products
Search
Document Center

Alibaba Cloud Service Mesh:Spring Cloud plug-in

Last Updated:Dec 09, 2024

You can connect Spring Cloud applications to Service Mesh (ASM) so that you can use cloud-native service governance capabilities to manage Spring Cloud services without modifying application code. You can enable the SpringCloud plug-in to manage Spring Cloud services in ASM. The effective range of this plug-in must be set to Global.

Important

In this example, you can refer to Manage Spring Cloud services to manage Spring Cloud services in ASM, and follow the steps in Step 1: Enable support for Spring Cloud on the ASM control plane to enable this plug-in.

Make sure that an Envoy filter is created before you create deployments so as to intercept the registration process. If specific deployments are created before you create the Envoy filter, you must enable rolling updates for the deployments.

Release notes and parameters

The SpringCloud plug-in has two versions, V1 and V2. The plug-in V2 is applicable to the ASM of version 1.13.4.32 or later and requires parameters that are different from that in plug-in V1 for plug-in configuration.

Version 1

The plug-in V1 is only applicable to the Nacos registries and can be used in all ASM versions that support the plug-in center.

Configuration fields

Parameter

Data type

Required

Default value

Description

port_number

String

Optional

8848

This parameter specifies the port number of a Nacos instance that the Envoy filter needs to intercept. The default port for a Nacos instance is 8848. If you have a self-built Nacos Server and have modified the port, you need to specify a custom port.

Version 2

The plug-in V2 is applicable to all Spring Cloud implementations and registries, and can only be used in ASM of version 1.13.4.32 or later.

Configuration fields

Parameter

Data type

Required

Default value

Description

provider_port_number

String

Optional

ALL

This parameter specifies the port of a Spring Cloud service (e.g., "8070"). If Spring Cloud services have different ports, you can leave this parameter unconfigured or set it to "ALL".

pod_cidrs

String array

Yes

["10.0.128.0/18"]

This parameter specifies the pod CIDR of the Alibaba Container Service for Kubernetes (ACK) or serverless Kubernetes (ASK) cluster. Log on to the ACK Console, go to the Clusters page and click the desired cluster to view pod CIDR. If Terway is used as the Container Network Interface (CNI) plug-in, go to the Clusters page, and click the Cluster Resources tab to obtain the pod vSwitch CIDR block. This parameter is required, and the default value is an example.

Upgrade notes

Due to the differences in valid values and configuration parameters that are required for version 1 and version 2 of SpringCloud plug-in, you must update the plug-in parameters and import the parameters required by the plug-in v2 before upgrading. Before upgrading, ensure that the plug-in parameters are in the following format:

port_number: '8848'
provider_port_number: '8070'
pod_cidrs:
  - 10.0.128.0/18