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
add a comment |
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
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
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
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
configuration kubernetes resources
asked yesterday
vania-pooh
1,80611532
1,80611532
You can try look to cronjob which will check and delete all which is older than.
– Nick Rak
18 hours ago
add a comment |
You can try look to cronjob which will check and delete all which is older than.
– Nick Rak
18 hours ago
You can try look to cronjob which will check and delete all which is older than.
– Nick Rak
18 hours ago
You can try look to cronjob which will check and delete all which is older than.
– Nick Rak
18 hours ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53222144%2fkubernetes-automatically-remove-old-custom-resource-definitions%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You can try look to cronjob which will check and delete all which is older than.
– Nick Rak
18 hours ago