All Products
Search
Document Center

Container Service for Kubernetes:Migrate from SLB Ingress to ALB Ingress

Last Updated:Jun 24, 2026

Starting February 28, 2023, Container Service for Kubernetes (ACK) Serverless retires SLB Ingress: you can no longer install or manage the SLB Ingress Controller add-on through the cluster, and SLB Ingress is no longer supported. Migrate SLB Ingress to ALB Ingress promptly. This topic walks you through creating ALB Ingress, shifting DNS traffic, and deleting the SLB Ingress.

Background

SLB has limited Layer 7 capabilities—it does not support features such as HTTP header rewriting, redirection, URL rewriting, or rate limiting, and requires manual instance specification management. ALB Ingress is a Layer 7 gateway with stronger Ingress traffic management.

ALB Ingress uses Alibaba Cloud Application Load Balancer (ALB). It supports header- and cookie-based routing, automatic certificate discovery, HTTP, HTTPS, and QUIC, and better handles Layer 7 traffic for cloud-native applications. See Introduction to the SLB product family for an ALB and SLB feature comparison.

Migration process

image

Migration example

This example uses an Ingress resource whose endpoint resolves to demo.ingress.vip.

View the YAML file

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: demo-ingress
  namespace: default
spec:
  ingressClassName: slb
  rules:
    - host: demo.ingress.vip
      http:
        paths:
          - backend:
              service:
                name: nginx
                port:
                  number: 80
            path: /
            pathType: Prefix

Enter demo.ingress.vip in your browser's address bar to see Welcome to nginx!.

Step 1: Create an ALB Ingress

  1. Install the ALB Ingress Controller add-on per Manage the ALB Ingress controller.

  2. Obtain the kubeconfig file of a cluster and use kubectl to connect to the cluster.

  3. Create an AlbConfig:

    1. Create albconfig.yaml with the following content:

      apiVersion: alibabacloud.com/v1
      kind: AlbConfig
      metadata:
        name: alb-demo
      spec:
        config:
          name: alb-test
          addressType: Internet
          zoneMappings:
          - vSwitchId: vsw-wz9e2usil7e5an1xi****
          - vSwitchId: vsw-wz92lvykqj1siwvif****
        listeners:
          - port: 80
            protocol: HTTP

      zoneMappings: vSwitch IDs for the ALB Ingress. Specify at least two vSwitches in different zones in the same VPC as your cluster.

    2. Create the AlbConfig:

      kubectl apply -f albconfig.yaml
    3. Verify that the ALB instance is created:

      kubectl get albconfig <AlbConfig-name>

      Expected output:

      NAME       ALBID                    DNSNAME                                               PORT&PROTOCOL   CERTID   AGE
      alb-demo   alb-eeee6gtqbmrm19****   alb-eeee6gtqbmrm19****.cn-shenzhen.alb.aliyuncs.com                            27s
  4. Create an IngressClass:

    1. Create ingressclass.yaml with the following content:

      apiVersion: networking.k8s.io/v1
      kind: IngressClass
      metadata:
        name: alb
      spec:
        controller: ingress.k8s.alibabacloud/alb
        parameters:
          apiGroup: alibabacloud.com
          kind: AlbConfig
          name: alb-demo

      parameters.name: The AlbConfig name to bind.

    2. Create the IngressClass:

      kubectl apply -f ingressclass.yaml
  5. Create an ALB Ingress:

    1. Create albingress.yaml with the following content:

      apiVersion: networking.k8s.io/v1
      kind: Ingress
      metadata:
        name: demo-ingress-alb
        namespace: default
      spec:
        ingressClassName: alb
        rules:
          - host: demo.ingress.vip
            http:
              paths:
                - backend:
                    service:
                      name: nginx
                      port:
                        number: 80
                  path: /
                  pathType: Prefix
      • name: Ingress name. Must differ from the SLB Ingress name.

      • ingressClassName: IngressClass name.

    2. Create the ALB Ingress:

      kubectl apply -f albingress.yaml
    3. Get the ALB Ingress endpoint:

      kubectl get ing

      Expected output:

      NAME                CLASS   HOSTS              ADDRESS                                               PORTS   AGE
      demo-ingress       slb     demo.ingress.vip   120.79.**.**                                           80      35m
      demo-ingress-alb   alb     demo.ingress.vip   alb-eeee6gtqbmrm1****.cn-shenzhen.alb.aliyuncs.com   80      10m     46s

      Note the ALB Ingress endpoint from the output, such as alb-eeee6gtqbmrm1****.cn-shenzhen.alb.aliyuncs.com.

    4. Access the Nginx application through the ALB Ingress:

      curl -H "Host: demo.ingress.vip" http://alb-eeee6gtqbmrm1****.cn-shenzhen.alb.aliyuncs.com

      Expected output:

      <!DOCTYPE html>
      <html>
      <head>
      <title>Welcome to nginx!</title>
      <style>
          body {
              width: 35em;
              margin: 0 auto;
              font-family: Tahoma, Verdana, Arial, sans-serif;
          }
      </style>
      .............

Step 2: Shift traffic to ALB Ingress

Update the DNS record for demo.ingress.vip to point to the ALB endpoint instead of the SLB endpoint to route traffic through the ALB Ingress.

  1. Log on to the Alibaba Cloud DNS console.

  2. On the Configure domain name page, click the domain name on the All Zone Names tab.

  3. On the Settings page, find the target DNS record and click Modify in the Actions column.

  4. In the Modify Record dialog box, set Record Value to the ALB Ingress endpoint (for example, alb-eeee6gtqbmrm1****.cn-shenzhen.alb.aliyuncs.com), and click OK.

  5. Enter demo.ingress.vip in your browser's address bar.

    The browser displays Welcome to nginx!, confirming that Nginx is reachable through the ALB Ingress and that cutover from SLB Ingress to ALB Ingress succeeded.

Step 3: Delete the SLB Ingress

  1. Delete the SLB Ingress:

    1. In the left navigation pane of the cluster management page, choose Network > Ingresses.

    2. On the Ingresses page, select the appropriate Namespace, find the SLB Ingress, and choose More > Delete in the Actions column.

    3. In the dialog box, click OK.

  2. Uninstall the SLB Ingress Controller add-on:

    1. Log on to the ACK console. In the left navigation pane, click Clusters.

    2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Add-ons.

    3. On the Add-ons page, open the Others tab, find SLB Ingress controller, and click Uninstall.

    4. In the dialog box, click OK.

FAQ

Can I perform a seamless migration from SLB Ingress to ALB Ingress?

No. In-place migration is not supported because ALB and SLB are different load balancer types.