<p>We have an application running on EKS 1.21 and we are in the process of upgrading to EKS 1.22 since 1.21 will reach end of support in Feb 2023. I am trying to figure out a kubectl command or something similar that can query the entire cluster for any v1beta1 API versions that are deprecated and replaced by GA v1 as per :-</p>
<p><a href="https://kubernetes.io/blog/2021/07/14/upcoming-changes-in-kubernetes-1-22/" rel="nofollow noreferrer">https://kubernetes.io/blog/2021/07/14/upcoming-changes-in-kubernetes-1-22/</a></p>
<p><a href="https://docs.aws.amazon.com/eks/latest/userguide/update-cluster.html#update-1.22" rel="nofollow noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/update-cluster.html#update-1.22</a></p>
<p><a href="https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22</a></p>
<p>Is there a comprehensive consolidated kubectl command that can be used to see if there is any YAML manifest in the cluster that still uses v1beta1?</p>

<p>The below command would return the namespace, name, apiVersion, and all the resources in your cluster. You can pipe this with grep to filter wherever you want.</p>
<pre><code>kubectl api-resources --no-headers  |while read type ignore; do kubectl get $type  -A -o go-template='{{range $index,$pod := .items}}{{(or .metadata.name  &quot;-&quot;)}} {{(or .metadata.namespace &quot;-&quot;)}} {{ (or .kind &quot;-&quot;)}} {{ (or .apiVersion  &quot;-&quot;) }} {{&quot;\n&quot;}}{{end}}'  2&gt;/dev/null; done
</code></pre>
