future-fountain-82544
06/26/2025, 12:12 AMError: UPGRADE FAILED: unable to build kubernetes objects from current release manifest: resource mapping not found for name: "rancher-monitoring-prometheus-node-exporter" namespace: "cattle-monitoring-system" from "": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"
Somewhere along the way of upgrading k3s, I want to say that the last remaining PodSecurityPolicy may have been deleted manually or by the process of upgrading k3s. I think helm is trying to find them to remove them and is of course unsuccessful. Anyone run into this with helm and know how to resolve this? More details will be in-threadfuture-fountain-82544
06/26/2025, 12:13 AMfuture-fountain-82544
06/26/2025, 12:14 AM% helm --kube-context=... -n cattle-monitoring-system list --all
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
rancher-monitoring cattle-monitoring-system 2 2024-08-23 14:46:51.478744389 +0000 UTC deployed rancher-monitoring-103.1.1+up45.31.1 v0.65.1
rancher-monitoring-crd cattle-monitoring-system 4 2025-06-26 00:06:44.869156938 +0000 UTC deployed rancher-monitoring-crd-106.1.2+up69.8.2-rancher.7
future-fountain-82544
06/26/2025, 12:25 AMhelm --kube-context=r/macc-kdev -n cattle-monitoring-system get manifest rancher-monitoring
in the output...
---
# Source: rancher-monitoring/charts/prometheus-node-exporter/templates/psp.yaml
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: rancher-monitoring-prometheus-node-exporter
namespace: cattle-monitoring-system
labels:
<http://helm.sh/chart|helm.sh/chart>: prometheus-node-exporter-4.20.0
<http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: Helm
<http://app.kubernetes.io/component|app.kubernetes.io/component>: metrics
<http://app.kubernetes.io/part-of|app.kubernetes.io/part-of>: prometheus-node-exporter
<http://app.kubernetes.io/name|app.kubernetes.io/name>: prometheus-node-exporter
<http://app.kubernetes.io/instance|app.kubernetes.io/instance>: rancher-monitoring
<http://app.kubernetes.io/version|app.kubernetes.io/version>: "1.6.0"
jobLabel: node-exporter
release: rancher-monitoring
spec:
...
future-fountain-82544
06/26/2025, 7:22 PMhelm get manifest rancher-monitoring --revision N
, it looks like the PodSecurityPolicy was removed from the history so it was able to continue the upgrade and skip deleting a resource from an API that no longer exists
# add rancher repo
helm repo add rancher <https://charts.rancher.io/>
helm repo update
# add mapkubeapis plugin
helm plugin install <https://github.com/helm/helm-mapkubeapis>
# Upgrade snippets
helm -n cattle-monitoring-system list
helm -n cattle-monitoring-system mapkubeapis rancher-monitoring
helm -n cattle-monitoring-system upgrade rancher-monitoring-crd rancher/rancher-monitoring-crd --reset-then-reuse-values --wait
helm -n cattle-monitoring-system upgrade rancher-monitoring rancher/rancher-monitoring --reset-then-reuse-values --wait