Replace ack-ingress-nginx with ack-ingress-nginx-v1 to support Kubernetes 1.24 and later.
Background
ACK Kubernetes 1.24 deprecates v1beta1 Ingress resources. ack-ingress-nginx installs Nginx Ingress Controller 0.44.0, which uses v1beta1. After upgrading to Kubernetes 1.24, this controller becomes unavailable.
ack-ingress-nginx-v1 uses Nginx Ingress Controller ≥ 1.1.0. Replace ack-ingress-nginx with ack-ingress-nginx-v1 to keep the controller running.
This does not apply to the Nginx Ingress Controller in Component Management. To upgrade that component, see Upgrade the Nginx Ingress Controller component.
Prerequisites
-
Cluster version is 1.20 or later.
Noteack-ingress-nginx-v1 Chart 4.0.17+ (component v1.8.0-aliyun.1+) requires cluster version 1.22 or later. For cluster version 1.20, use Chart 4.0.16 (component v1.2.1-aliyun.1).
-
ack-ingress-nginx is installed from the Marketplace.
Step 1: Create an ack-ingress-nginx-v1 application
Create an ack-ingress-nginx-v1 application from Marketplace
For each ack-ingress-nginx application, deploy a corresponding ack-ingress-nginx-v1 application as described in Deploy multiple Ingress Controllers to isolate traffic.
Do not set controller.ingressClassResource.name in ack-ingress-nginx-v1 to the same value as controller.ingressClass in ack-ingress-nginx. Conflicting Ingress Classes may cause controller stability issues.
(Optional) Adjust SLB specifications and parameters
If you previously adjusted Server Load Balancer (SLB) specifications or parameters for ack-ingress-nginx, you may also need to apply the same adjustments to ack-ingress-nginx-v1. Configure the Service using Annotations controller.service (public network) or controller.service.internal (private network). See Configure Classic Load Balancer (CLB) using Annotations for CLB or Configure Network Load Balancer (NLB) using Annotations for NLB.
Step 2: Create and validate Ingress routing rules
Copy your existing Ingress routing rules, update the Ingress Class, and apply them to avoid disrupting traffic. For example:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: test-ingress
namespace: default
annotations:
kubernetes.io/ingress.class: nginx-intranet # Original Ingress Class is nginx-intranet.
spec:
rules:
- host: test-ingress.com
http:
paths:
- path: /foo
backend:
service:
name: web1-service
port:
number: 8080
pathType: ImplementationSpecific
- path: /bar
backend:
service:
name: web1-service
port:
number: 8080
pathType: ImplementationSpecific
Create a new Ingress routing rule.
-
When using Annotations, change only the Ingress Class name. Keep all other configurations unchanged.
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: test-ingress-v1 # Create a new Ingress resource. namespace: default annotations: kubernetes.io/ingress.class: nginx-intranet-v1 # Change to the Ingress Class used by ack-ingress-nginx-v1, for example, nginx-intranet-v1. spec: rules: - host: test-ingress.com http: paths: - path: /foo backend: service: name: web1-service port: number: 8080 pathType: ImplementationSpecific - path: /bar backend: service: name: web1-service port: number: 8080 pathType: ImplementationSpecific -
If you use
spec.ingressClassNameinstead of Annotations, create a new Ingress rule and update the Ingress Class name inspec.ingressClassName.
After creating the new Ingress rule, validate by updating your local hosts file to resolve the domain name to the new CLB IP address.
Step 3: Migrate traffic
After validating the new Ingress routing rules, migrate traffic to ack-ingress-nginx-v1 by updating DNS records.
Log on to the Alibaba Cloud DNS console or your domain provider’s DNS console. Update the DNS record to point to the new IP address. Monitor your application during DNS propagation and roll back if needed. Use container logs or Metrics to track migration progress.
Next steps
After migrating all traffic and confirming normal operation, delete the original ack-ingress-nginx application. Log on to the Container Service for Kubernetes console. Select your cluster, choose , find the release, and click Delete.