gpt4 book ai didi

kubernetes - 有没有办法强制删除 webhook 失败的 crd?

转载 作者:行者123 更新时间:2023-12-02 11:55:19 26 4
gpt4 key购买 nike

kubedb在这种情况下,运算符(operator)已崩溃且无响应 - 但是我需要清理这些资源。

 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

最佳答案

应该有种资源MutatingWebhookConfigurationValidatingWebhookConfiguration实际上注册了 webhook使用 Kubernetes 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

关于kubernetes - 有没有办法强制删除 webhook 失败的 crd?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62392045/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com