Cloud Native 12 min read

How to Implement Full‑Chain Gray Release with Alibaba Cloud MSE and ZadigX

This guide explains the common challenges enterprises face when adopting cloud‑native release strategies and provides a step‑by‑step solution using Alibaba Cloud MSE and ZadigX to create, configure, and manage full‑link gray deployments on Kubernetes clusters, including code examples and workflow automation.

Alibaba Cloud Native
Alibaba Cloud Native
Alibaba Cloud Native
How to Implement Full‑Chain Gray Release with Alibaba Cloud MSE and ZadigX

Current Enterprise Release Pain Points

Enterprises often struggle with three major issues when choosing and implementing a release strategy: 1. Lack of cloud‑native capabilities – migrating from traditional deployment to cloud‑native requires skilled personnel; 2. Absence of automation platforms – manual execution of release steps leads to omissions and human error; 3. Low release efficiency – only service‑level gray can be achieved, making the process slow and validation ineffective.

Solution Overview: Full‑Chain Gray Release with MSE

ZadigX partners with Alibaba Cloud MSE to offer a developer‑focused full‑link gray release solution that addresses the above pain points. MSE Microservice Engine, built on a Java Agent, provides non‑intrusive, production‑grade service governance without modifying business code and supports all Spring Boot, Spring Cloud, and Dubbo versions released in the past five years.

How It Works

The workflow creates a gray environment and corresponding K8s resources, automatically tags them for MSE, and integrates MSE APIs to reduce repetitive work. Developers stay within ZadigX, while administrators configure the environment once.

Project Initialization in ZadigX

Operations or DevOps engineers perform a one‑time project setup on ZadigX:

Create a new project (type: "K8s YAML").

Add services (nacos, spring‑a, spring‑b, spring‑c) and configure their YAML files.

Create a production environment and enable MSE by labeling the namespace:

kubectl label namespace <NAMESPACE> mse-enable=enabled

Enable MSE for the environment and verify that the one‑pilot init container is injected into the pods.

Service YAML Examples

Below are trimmed YAML snippets for the services. The required selector and template.metadata.labels must include zadigx-release-version: original.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nacos-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nacos-server
  template:
    metadata:
      labels:
        app: nacos-server
    spec:
      containers:
      - env:
        - name: MODE
          value: standalone
        image: nacos/nacos-server:v2.2.0
        imagePullPolicy: Always
        name: nacos-server
apiVersion: apps/v1
kind: Deployment
metadata:
  name: spring-cloud-a
spec:
  replicas: 1
  selector:
    matchLabels:
      app: spring-cloud-a
      zadigx-release-version: original
  template:
    metadata:
      labels:
        msePilotCreateAppName: spring-cloud-a
        app: spring-cloud-a
        zadigx-release-version: original
    spec:
      containers:
      - env:
        - name: JAVA_HOME
          value: /usr/lib/jvm/java-1.8-openjdk/jre
        image: registry.cn-shanghai.aliyuncs.com/yizhan/spring-cloud-a:0.1-SNAPSHOT
        imagePullPolicy: Always
        name: spring-cloud-a
        ports:
        - containerPort: 20001
        livenessProbe:
          tcpSocket:
            port: 20001
          initialDelaySeconds: 10
          periodSeconds: 30

Creating the Gray Environment and Enabling MSE

After installing the MSE component and the MSE Ingress cloud‑native gateway on an ACK cluster (refer to Alibaba Cloud documentation), create the MSE cloud‑native gateway and configure services to use it.

Configuring the Gray Release Workflow

Define two workflows in ZadigX:

mse-gray-workflow : tasks for deploying gray services, optional verification, and gray service cleanup.

prod-workflow : tasks for production deployment after gray validation.

Each workflow is visualized with screenshots in the original article.

Deploying Multiple Gray Services

Execute mse-gray-workflow, select the target services (e.g., spring‑cloud‑a and spring‑cloud‑c), set gray tags, adjust replica counts, and modify the generated YAML as needed. The workflow automatically creates the gray resources.

Adjusting Ingress for Gray Traffic

For the entry service (spring‑cloud‑a), modify the Ingress annotations to route gray traffic and add the header x-mse-tag: gray. Example snippet:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    mse.ingress.kubernetes.io/request-header-control-update: x-mse-tag gray
    nginx.ingress.kubernetes.io/canary: "true"
    nginx.ingress.kubernetes.io/canary-by-header: x-user-id
    nginx.ingress.kubernetes.io/canary-by-header-value: "100"
    nginx.ingress.kubernetes.io/canary-weight: "0"
  labels:
    zadigx-release-service-name: spring-a
    zadigx-release-type: mse-gray
    zadigx-release-version: gray
  name: spring-cloud-a-mse-gray
spec:
  ingressClassName: mse
  rules:
  - host: example.com
    http:
      paths:
      - backend:
          service:
            name: spring-cloud-a-mse-gray
            port:
              number: 20001
        path: /
        pathType: Prefix

Gray Result Verification and Production Release

After gray services are deployed, automatic or manual tests verify the new version. If validation succeeds, run prod-workflow to update the production services with the new images.

Cleaning Up Gray Services

When the production release is successful, execute mse-gray-workflow again, select the gray tags to be removed, and the workflow deletes the associated labels and resources, fully cleaning up the gray environment.

Conclusion

The full‑link gray release solution built on Alibaba Cloud MSE and ZadigX equips enterprises with cloud‑native capabilities, automation, and efficient release pipelines, dramatically improving delivery speed and software quality.

Reference Link 1
Reference Link 1
Reference Link 2
Reference Link 2
Reference Link 3
Reference Link 3
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cloud Nativeci/cdKubernetesMSEZadigX
Alibaba Cloud Native
Written by

Alibaba Cloud Native

We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.