I have an Rancher instance running on k3s that is nearing 4+ years old that started at version 2.4.X or 2.5.X. During a recent run of updating both the local and downstream clusters as they were running old versions of both rancher and k3s i noticed that there are several deprecated and unsupported CRD’s still in the local Rancher cluster.
Output from kubent
>>> Deprecated APIs removed in 1.22 <<<
------------------------------------------------------------------------------------------
KIND NAMESPACE NAME API_VERSION REPLACE_WITH (SINCE)
CustomResourceDefinition <undefined> backups.resources.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> bundledeployments.fleet.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> bundlenamespacemappings.fleet.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> bundles.fleet.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> clustergroups.fleet.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> clusterregistrations.fleet.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> clusterregistrationtokens.fleet.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> clusters.fleet.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> contents.fleet.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> gitjobs.gitjob.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> gitreporestrictions.fleet.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> gitrepos.fleet.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> resourcesets.resources.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition <undefined> restores.resources.cattle.io apiextensions.k8s.io/v1beta1 apiextensions.k8s.io/v1 (1.16.0)
The cluster is currently on version 1.28, (was on 1.24 when started running updates a few weeks ago).
I can find the above mentioned CRD’s in my local cluster but they are all using the /v1 apiextension, for ex:
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
meta.helm.sh/release-name: fleet-crd
meta.helm.sh/release-namespace: cattle-fleet-system
labels:
app.kubernetes.io/managed-by: Helm
name: bundledeployments.fleet.cattle.io
spec:
conversion:
strategy: None
group: fleet.cattle.io
names:
kind: BundleDeployment
listKind: BundleDeploymentList
plural: bundledeployments
singular: bundledeployment
...
Although i haven’t noticed any issues or conflicts with these unsupported CRD’s during updates of Rancher or the k3s version i would like to remove them from the cluster if possible to clean it up.
Any advice on how to do so?
Thanks in advance.