The kubedb operator in this case has crashed and un-responsive - however I need to cleanup these resources.
k delete redis r1 redis-queue --namespace cts --force --grace-period=0
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (InternalError): Internal error occurred: failed calling webhook "redis.validators.kubedb.com": the server is currently unable to handle the request
Error from server (InternalError): Internal error occurred: failed calling webhook "redis.validators.kubedb.com": the server is currently unable to handle the request
How to delete a CRD. To delete the CRD and resources we created, simply run kubectl delete just like with any other resources.
When you create a new CustomResourceDefinition (CRD), the Kubernetes API Server creates a new RESTful resource path for each version you specify. The custom resource created from a CRD object can be either namespaced or cluster-scoped, as specified in the CRD's spec.
Put simply, a validating webhook is an endpoint Kubernetes can invoke prior to persisting resources in ETCD. This endpoint should return a structured response indicating whether the resource should be rejected or accepted and persisted to the datastore.
There should be a resource of kind MutatingWebhookConfiguration
or ValidatingWebhookConfiguration
which actually registers the webhook
with Kubernetes API Server. You need to delete that resource first which deregisters the webhook from the Kubernetes API Server.
Temporary store kubedb-webhook configuration:
kubectl get ValidatingWebhookConfiguration redis.validators.kubedb.com \
-o yaml > redis-validator.yaml
kubectl get MutatingWebhookConfiguration redis.validators.kubedb.com \
-o yaml > redis-mutate-validator.yaml
Remove your resources:
kubectl delete redis r1 redis-queue --namespace cts
Bring back the webhook configuration:
kubectl apply -f redis-validator.yaml
kubectl apply -f redis-mutate-validator.yaml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With