This took a bit of digging to figure out. As it turns out, my lab ingress has evolved a little. This env may have had several ingress classes in the past.
- alpha env behind a LB with Let's Encrypt enabled
- the error is misleading, the api-resources are OK & pathType IS specified
- helm install works OK but won't touch ingress, keeps status as
failed
- even backing up ingress to make it net-new fails
$ helm upgrade rancher rancher-prime/rancher -n cattle-system --reuse-values
Error: UPGRADE FAILED: cannot patch "rancher" with kind Ingress: Ingress.networking.k8s.io "rancher" is invalid: spec.rules[0].http.paths[0].pathType: Required value: pathType must be specified
Add ingress.class=nginx
to values.yaml
and re-upgrade with helm upgrade -f values.yaml ...
Example ouput of helm get values -n cattle-system rancher
...
USER-SUPPLIED VALUES:
hostname: some-rancher.fqdn.com
ingress:
class: nginx
... (continues)
Ask your consultant for more information regarding clusters that have been upgraded over longer periods of time.
I had the same issue but it was literally that the value file now has the pathType in it; while my install didn't, so reusing caused the error.