# UPGRADE FAILED with 'no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"'

**URL:** <https://community.okteto.com/t/upgrade-failed-with-no-matches-for-kind-podsecuritypolicy-in-version-policy-v1beta1/802>\
**Category:** Help\
**Created:** [May 5, 2023, 1:30pm UTC](https://community.okteto.com/t/upgrade-failed-with-no-matches-for-kind-podsecuritypolicy-in-version-policy-v1beta1/802 "2023-05-05T13:30:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pchico83](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/pchico83/32/25_2.png) [@pchico83](https://community.okteto.com/u/pchico83)\
**Post date:** [May 5, 2023, 1:30pm UTC](https://community.okteto.com/t/upgrade-failed-with-no-matches-for-kind-podsecuritypolicy-in-version-policy-v1beta1/802/1 "2023-05-05T13:30:34Z")

</div>

I tried to upgrade my okteto chart version with Helm, but I am getting this error:

```auto
Error: UPGRADE FAILED: unable to build kubernetes objects from current release manifest: [resource mapping not found for name: "okteto-permissive" namespace: "" from "": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"
ensure CRDs are installed first, resource mapping not found for name: "okteto-restrictive" namespace: "" from "": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"
ensure CRDs are installed first]

```

what can I do to recover from this state?

---

<div class="post-metadata">

**Author:** ![pchico83](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/pchico83/32/25_2.png) [@pchico83](https://community.okteto.com/u/pchico83)\
**Post date:** [May 5, 2023, 1:34pm UTC](https://community.okteto.com/t/upgrade-failed-with-no-matches-for-kind-podsecuritypolicy-in-version-policy-v1beta1/802/2 "2023-05-05T13:34:05Z")

</div>

To avoid this situation, you can upgrade your okteto chart version before upgrading Kubernetes to \>= 1.25, adding this to your helm values file:

```auto
podSecurityPolicy:
   enabled: false

```

If you are already hitting this error, you can recover from it by deleteting all the secrets created by Helm to keep track of the okteto releases. Assuming `okteto` is the name of your release, you can delete these secrets by running:

```auto
kubectl -nokteto delete secrets -l name=okteto,owner=helm

```

After this, you will be able to run a clean okteto install with `helm install okteto ...`.  
It’s important that you use the same release name when you install okteto with helm again.
