Upgrading an Application Load Balancer Ingress controller for Managed Service for Kubernetes
ALB Ingress Controller versions 0.2.0 are incompatible with any 0.1.x releases. This incompatibility causes backend groups limitations.
One method for creating a backend group involves specifying rules directly in the Ingress
resource. Pre-0.2.0 ALB Ingress Controller versions map each backend group to a distinct combination of host
, http.paths.path
, and http.paths.pathType
values. ALB Ingress Controllers v0.2.0 and later map backend groups to the backend.service
setting of the Ingress
resource. This setting specifies a Kubernetes service. For more information about Ingress
resource configuration and settings, see the relevant Kubernetes article
When upgrading your ALB Ingress Controller from version 0.1.x to 0.2.0 or later, check whether any of the following scenarios apply to your Ingress
resource groups, .i.e., Ingress
resources with matching ingress.alb.yc.io/group-name
values:
-
They are configured with the same
host
,http.paths.path
, andhttp.paths.pathType
combinations, but differentbackend.service.name
, i.e., Kubernetes service, values. In this case, recreate your backend groups as HttpBackendGroup custom resources. -
There is one Kubernetes service per multiple
host
,http.paths.path
, andhttp.paths.pathType
combinations. In this case, check whether theirbackend
setitngs differ. For example, oneIngress
resource group can route gRPC traffic, while another handles HTTP connections.If backend settings match, no configuration changes are needed. Otherwise, follow the steps below:
-
Create an individual
Service
configuration file for eachIngress
resource group and specify the following settings:Service name
: Use a different name for each service.Deployment
: This name must be the same for all services, as you previously used only one Kubernetes service.- Backend settings differing between
Ingress
resource groups.
Sample configuration file
apiVersion: v1 kind: Service metadata: name: alb-demo-service-1 # Specify different names for each service. spec: selector: app: alb-demo-app # Specify the same Deployment for each service. type: NodePort ports: ... # Specify the settings differing for Ingress resource groups.
-
Apply the configurations:
kubectl apply -f <configuration_file_names>
-
Change Kubernetes service names in the
Ingress
resources. In thebackend.service.name
setting, specify the service name associated with theIngress
resource’s group. -
Apply the updated
Ingress
resource configurations:kubectl apply -f <Ingress_resource_file_names>
-
Note
If you cannot change the Ingress
resource configuration, do not upgrade the ALB Ingress Controller, or it will lead to collisions.