7

在这种情况下,kubedb操作员已经崩溃并且没有响应 - 但是我需要清理这些资源。

 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

4

1 回答 1

9

应该有一种资源,MutatingWebhookConfiguration或者ValidatingWebhookConfiguration实际向webhookKubernetes API 服务器注册。您需要先删除该资源,该资源会从 Kubernetes API 服务器取消注册 webhook。

临时存储kubedb-webhook配置:

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

删除您的资源:

kubectl delete redis r1 redis-queue --namespace cts

带回 webhook 配置:

kubectl apply -f redis-validator.yaml
kubectl apply -f redis-mutate-validator.yaml
于 2020-06-15T16:10:06.133 回答