Kubernetes: automatically remove old custom resource definitions
up vote 0 down vote favorite I'm working with custom resource definitions in Kubernetes. For example I have the following definition: apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: myresources.test.example.com spec: group: test.example.com names: kind: MyResource listKind: MyResourceList plural: myresources singular: myresource scope: Namespaced version: v1alpha1 Is there any way to store e.g. only 1000 last created resources of type MyResource and automatically delete everything older? I know about pod eviction policies. Is it somehow applicable to custom resources? configuration kubernetes resources share | improve this question asked yesterday vania-pooh 1,806 1 15 32 You can try look to cronjob which will check and delete all which is older than. – Nick Rak 18 hours ago add a comment | up vote 0 down vote favorite I'm working with custom...