Upgrade

Upgrade on AWS

On this page

When to use this procedure

Do not use this procedure if you have an HAProxy Enterprise license key. Instead, see Upgrade on premises.

If you previously installed HAProxy Enterprise Kubernetes Ingress Controller from the AWS Marketplace, follow these steps to upgrade to the current version of the ingress controller:

  1. From the AWS Marketplace home page, click Manage subscriptions.

  2. Find HAProxy Enterprise Ingress Controller in your list of subscriptions, then click Launch more software.

  3. On the Configure this software screen, choose the fulfillment option and then software version, which determines the version of the Helm chart you will launch. Newer versions of the Helm chart support newer versions of HAProxy Enterprise Kubernetes Ingress Controller. Typically, you will choose the most recent version.

  4. Click Continue to Launch.

  5. On your local workstation, connect to your Kubernetes cluster using the AWS CLI. This will create a ~/.kube/config file:

    nix
    aws eks --region [Your region] update-kubeconfig --name [Your cluster name]
    nix
    aws eks --region [Your region] update-kubeconfig --name [Your cluster name]
  6. Check that you can access the cluster by calling kubectl get pods:

    nix
    kubectl get pods
    nix
    kubectl get pods

    A list of created resources should display.

  7. To pull the ingress controller’s container image from Amazon Elastic Container Registry, first log into the container registry:

    nix
    aws ecr get-login-password --region us-east-1 | \
    helm registry login \
    --username AWS \
    --password-stdin 709825985650.dkr.ecr.us-east-1.amazonaws.com
    nix
    aws ecr get-login-password --region us-east-1 | \
    helm registry login \
    --username AWS \
    --password-stdin 709825985650.dkr.ecr.us-east-1.amazonaws.com
    output
    text
    Login Succeeded
    output
    text
    Login Succeeded
  8. Pull the image. Set the version to the fulfillment option from the Configure this software screen in the AWS Marketplace. For example, 1.29.2.

    nix
    helm pull oci://709825985650.dkr.ecr.us-east-1.amazonaws.com/haproxy-technologies/haproxy-ingress-controller-helm-chart2 \
    --version <VERSION>
    nix
    helm pull oci://709825985650.dkr.ecr.us-east-1.amazonaws.com/haproxy-technologies/haproxy-ingress-controller-helm-chart2 \
    --version <VERSION>
  9. When calling helm upgrade, pass all arguments that you previously used when installing the ingress controller:

    nix
    helm upgrade haproxy-kubernetes-ingress \
    --namespace haproxy-controller \
    --set controller.service.type=LoadBalancer \
    --set "aws.licenseConfigSecretName=license-token-secret" \
    ./haproxy-ingress-controller-helm-chart2-*.tgz
    nix
    helm upgrade haproxy-kubernetes-ingress \
    --namespace haproxy-controller \
    --set controller.service.type=LoadBalancer \
    --set "aws.licenseConfigSecretName=license-token-secret" \
    ./haproxy-ingress-controller-helm-chart2-*.tgz

Update CRDs Jump to heading

If you installed the ingress controller with Helm, updates to CRDs are applied automatically upon installation (helm install) and upgrade (helm upgrade). If you installed the ingress controller via kubectl, you will need to run a CRD update job using kubectl.

Prerequisites

This procedure does not install CRDs. Before updating them, you must make sure they are installed. See each CRD page under the Reference section for more information.

To update your CRDs:

  1. Find the ingress controller pod using kubectl get pods:

    nix
    kubectl get pods -n haproxy-controller
    nix
    kubectl get pods -n haproxy-controller
    example output
    text
    NAME READY STATUS RESTARTS AGE
    haproxy-kubernetes-ingress-59f7587966-9kjtv 1/1 Running 0 11m
    example output
    text
    NAME READY STATUS RESTARTS AGE
    haproxy-kubernetes-ingress-59f7587966-9kjtv 1/1 Running 0 11m
  2. Using the name of the haproxy-kubernetes-ingress pod (or one of the pods if you have more than one), call kubectl exec with the command /haproxy-ingress-controller --job-check-crd to update the CRDs. Note that this does not actually run an instance of the ingress controller, but rather, runs the ingress controller in a special mode that updates CRDs only.

    nix
    kubectl exec -it -n haproxy-controller haproxy-kubernetes-ingress-59f7587966-9kjtv -- /haproxy-ingress-controller --job-check-crd
    nix
    kubectl exec -it -n haproxy-controller haproxy-kubernetes-ingress-59f7587966-9kjtv -- /haproxy-ingress-controller --job-check-crd
    example output
    text
    2024/05/24 18:50:45 maxprocs: Leaving GOMAXPROCS=2: CPU quota undefined
    2024/05/24 18:50:45 /src/main.go:91
    _ _ _ ____ _____ _____
    | | | | / \ | _ \ _ __ _____ ___ _ | ____| ____|
    | |_| | / _ \ | |_) | '__/ _ \ \/ / | | | | _| | _|
    | _ |/ ___ \| __/| | | (_) > <| |_| | | |___| |___
    |_| |_/_/ \_\_| |_| \___/_/\_\\__, | |_____|_____|
    _ __ _ |___/ ___ ____
    | |/ / _| |__ ___ _ __ _ __ ___| |_ ___ ___ |_ _/ ___|
    | ' / | | | '_ \ / _ \ '__| '_ \ / _ \ __/ _ \/ __| | | |
    | . \ |_| | |_) | __/ | | | | | __/ || __/\__ \ | | |___
    |_|\_\__,_|_.__/ \___|_| |_| |_|\___|\__\___||___/ |___\____|
    2024/05/24 18:50:45 /src/main.go:92
    ____ ____ ____ _ _ _ _
    / ___| _ \| _ \ | | | |_ __ __| | __ _| |_ ___ _ __
    | | | |_) | | | | | | | | '_ \ / _` |/ _` | __/ _ \ '__|
    | |___| _ <| |_| | | |_| | |_) | (_| | (_| | || __/ |
    \____|_| \_\____/ \___/| .__/ \__,_|\__,_|\__\___|_|
    |_|
    2024/05/24 18:50:45 INFO /src/main.go:93 HAProxy Ingress Controller CRD Updater v1.11.3-ee4 38342bbb.dirty
    2024/05/24 18:50:45 INFO /src/main.go:94 Build from: github.com/haproxytech/kubernetes-ingress
    2024/05/24 18:50:45 INFO /src/main.go:95 Build date: 2024-04-26T07:37:43Z
    2024/05/24 18:50:45 INFO job/crd-check.go:31 checking CRDs
    2024/05/24 18:50:45 INFO job/crd-check.go:49
    2024/05/24 18:50:45 INFO job/crd-check.go:50 checking CRD defaults.ingress.v1.haproxy.com
    2024/05/24 18:50:45 INFO job/crd-check.go:66 CRD defaults.ingress.v1.haproxy.com exists
    2024/05/24 18:50:45 INFO job/crd-check.go:92 CRD defaults.ingress.v1.haproxy.com exists as v1, CN[v5.1.3-ee2]
    2024/05/24 18:50:45 INFO job/crd-check.go:49
    2024/05/24 18:50:45 INFO job/crd-check.go:50 checking CRD globals.ingress.v1.haproxy.com
    2024/05/24 18:50:45 INFO job/crd-check.go:66 CRD globals.ingress.v1.haproxy.com exists
    2024/05/24 18:50:45 INFO job/crd-check.go:92 CRD globals.ingress.v1.haproxy.com exists as v1, CN[v5.1.3-ee2]
    2024/05/24 18:50:45 INFO job/crd-check.go:49
    2024/05/24 18:50:45 INFO job/crd-check.go:50 checking CRD backends.ingress.v1.haproxy.com
    2024/05/24 18:50:45 INFO job/crd-check.go:66 CRD backends.ingress.v1.haproxy.com exists
    2024/05/24 18:50:45 INFO job/crd-check.go:92 CRD backends.ingress.v1.haproxy.com exists as v1, CN[v5.1.3-ee2]
    2024/05/24 18:50:45 INFO job/crd-check.go:111
    2024/05/24 18:50:45 INFO job/crd-check.go:112 CRD update done
    example output
    text
    2024/05/24 18:50:45 maxprocs: Leaving GOMAXPROCS=2: CPU quota undefined
    2024/05/24 18:50:45 /src/main.go:91
    _ _ _ ____ _____ _____
    | | | | / \ | _ \ _ __ _____ ___ _ | ____| ____|
    | |_| | / _ \ | |_) | '__/ _ \ \/ / | | | | _| | _|
    | _ |/ ___ \| __/| | | (_) > <| |_| | | |___| |___
    |_| |_/_/ \_\_| |_| \___/_/\_\\__, | |_____|_____|
    _ __ _ |___/ ___ ____
    | |/ / _| |__ ___ _ __ _ __ ___| |_ ___ ___ |_ _/ ___|
    | ' / | | | '_ \ / _ \ '__| '_ \ / _ \ __/ _ \/ __| | | |
    | . \ |_| | |_) | __/ | | | | | __/ || __/\__ \ | | |___
    |_|\_\__,_|_.__/ \___|_| |_| |_|\___|\__\___||___/ |___\____|
    2024/05/24 18:50:45 /src/main.go:92
    ____ ____ ____ _ _ _ _
    / ___| _ \| _ \ | | | |_ __ __| | __ _| |_ ___ _ __
    | | | |_) | | | | | | | | '_ \ / _` |/ _` | __/ _ \ '__|
    | |___| _ <| |_| | | |_| | |_) | (_| | (_| | || __/ |
    \____|_| \_\____/ \___/| .__/ \__,_|\__,_|\__\___|_|
    |_|
    2024/05/24 18:50:45 INFO /src/main.go:93 HAProxy Ingress Controller CRD Updater v1.11.3-ee4 38342bbb.dirty
    2024/05/24 18:50:45 INFO /src/main.go:94 Build from: github.com/haproxytech/kubernetes-ingress
    2024/05/24 18:50:45 INFO /src/main.go:95 Build date: 2024-04-26T07:37:43Z
    2024/05/24 18:50:45 INFO job/crd-check.go:31 checking CRDs
    2024/05/24 18:50:45 INFO job/crd-check.go:49
    2024/05/24 18:50:45 INFO job/crd-check.go:50 checking CRD defaults.ingress.v1.haproxy.com
    2024/05/24 18:50:45 INFO job/crd-check.go:66 CRD defaults.ingress.v1.haproxy.com exists
    2024/05/24 18:50:45 INFO job/crd-check.go:92 CRD defaults.ingress.v1.haproxy.com exists as v1, CN[v5.1.3-ee2]
    2024/05/24 18:50:45 INFO job/crd-check.go:49
    2024/05/24 18:50:45 INFO job/crd-check.go:50 checking CRD globals.ingress.v1.haproxy.com
    2024/05/24 18:50:45 INFO job/crd-check.go:66 CRD globals.ingress.v1.haproxy.com exists
    2024/05/24 18:50:45 INFO job/crd-check.go:92 CRD globals.ingress.v1.haproxy.com exists as v1, CN[v5.1.3-ee2]
    2024/05/24 18:50:45 INFO job/crd-check.go:49
    2024/05/24 18:50:45 INFO job/crd-check.go:50 checking CRD backends.ingress.v1.haproxy.com
    2024/05/24 18:50:45 INFO job/crd-check.go:66 CRD backends.ingress.v1.haproxy.com exists
    2024/05/24 18:50:45 INFO job/crd-check.go:92 CRD backends.ingress.v1.haproxy.com exists as v1, CN[v5.1.3-ee2]
    2024/05/24 18:50:45 INFO job/crd-check.go:111
    2024/05/24 18:50:45 INFO job/crd-check.go:112 CRD update done

    You should see in the output the text CRD update done, which means that the update was successful. If you receive an error like the following:

    text
    2024/05/24 18:51:59 INFO job/crd-check.go:57 CRD backends.ingress.v1.haproxy.com does not exist
    2024/05/24 18:51:59 ERROR /src/main.go:99 customresourcedefinitions.apiextensions.k8s.io is forbidden: User "system:serviceaccount:haproxy-controller:haproxy-ingress-service-account" cannot create resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
    text
    2024/05/24 18:51:59 INFO job/crd-check.go:57 CRD backends.ingress.v1.haproxy.com does not exist
    2024/05/24 18:51:59 ERROR /src/main.go:99 customresourcedefinitions.apiextensions.k8s.io is forbidden: User "system:serviceaccount:haproxy-controller:haproxy-ingress-service-account" cannot create resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope

    This means that the CRD is not installed. Install any missing CRDs and run the kubectl exec command again.

Do you have any suggestions on how we can improve the content of this page?