Skip to content

Upgrade to Rancher Prime v2.13.1 fails in clusters with ingress-nginx

Article Number: 000022236

Environment

Helm chart upgrade to Rancher Prime v2.13.1 in a cluster utilizing the ingress-nginx ingress controller.

Situation

When performing a Helm chart upgrade of a Rancher instance to Rancher Prime v2.13.1 in a cluster with the ingress-nginx ingress controller, the upgrade fails with an error of the following format:

Error: UPGRADE FAILED: failed to create resource: admission webhook "validate.nginx.ingress.kubernetes.io" denied the request: host "<rancher-hostname>" and path "/" is already defined in ingress cattle-system/rancher

Cause

In Rancher Prime v2.13.1, the Helm chart name was changed from rancher to rancher-prime. Because the Rancher Helm chart templates its resource names based on the chart name by default, the upgrade process attempts to create new resources (suffixed with rancher-prime) before the existing resources (suffixed with rancher) are fully removed.

The ingress-nginx validating webhook admission controller blocks the creation of the new rancher-rancher-prime Ingress resource because the existing rancher Ingress resource - containing the identical host and path configuration - still exists in the cluster.

Resolution

To resolve this issue, manually delete the existing Rancher Ingress resource in the local cluster and then re-run the Helm upgrade:

  1. Delete the existing ingress: kubectl -n cattle-system delete ingress rancher
  2. Re-run the Helm upgrade command.