首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >有没有办法强制删除网络钩子失败的crd?

有没有办法强制删除网络钩子失败的crd?
EN

Stack Overflow用户
提问于 2020-06-15 23:51:27
回答 1查看 4.3K关注 0票数 6

本例中的kubedb操作符已经崩溃并且没有响应--但是我需要清理这些资源。

代码语言:javascript
复制
 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
EN

回答 1

Stack Overflow用户

发布于 2020-06-16 00:10:06

应该有一个MutatingWebhookConfigurationValidatingWebhookConfiguration类型的资源,它实际向Kubernetes API Server注册webhook。您需要首先删除该资源,这将从Kubernetes API Server注销webhook。

临时存储kubedb-webhook配置:

代码语言:javascript
复制
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

删除您的资源:

代码语言:javascript
复制
kubectl delete redis r1 redis-queue --namespace cts

带回webhook配置:

代码语言:javascript
复制
kubectl apply -f redis-validator.yaml
kubectl apply -f redis-mutate-validator.yaml
票数 9
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62392045

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档