k8s集群接入了kubegems之后删除namespace报错kubegems-local-controller-webhook-not-found
文章发布较早,内容可能过时,阅读注意甄别。
部署了 kubegems,然后集群接入了,后来没再使用,再删除集群的命名空间时,遇到了如下的报错:
$ kubectl delete ns test
Error from server (InternalError): Internal error occurred: failed calling webhook "valiate.namespace.dev": Post "https://kubegems-local-controller-webhook.kubegems-local.svc:443/validate?timeout=10s": service "kubegems-local-controller-webhook" not found
1
2
2
此时,需要先删除如下资源,然后再执行 delete 就不会报错了:
$ kubectl delete validatingwebhookconfiguration kubegems-local-controller-webhook
1
validatingwebhookconfiguration 是 k8s 中一种 webhook,表示接受或拒绝和对象而不更改它的准入 Webhook 的配置。
上次更新: 2024/11/19, 23:11:42