[英]How do I debug a Kubernetes validating admission webhook?
I have a webhook running as a service in cluster, I have a valid ValidatingWebhookConfiguration
defined for it: 我有一个Webhook在集群中作为服务运行,我为它定义了有效的ValidatingWebhookConfiguration
:
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: ingress-check-webhook-cfg
webhooks:
- name: ingress.check.webhook
rules:
- apiGroups:
- extensions
apiVersions:
- v1
operations:
- CREATE
- UPDATE
resources:
- ingresses
failurePolicy: Ignore
clientConfig:
service:
name: ingress-check-webhook-svc
namespace: operations
path: "/validate"
caBundle: <cert stuff>
I can curl -k https://ingress-check-webhook-svc.operations/validate
within the cluster and see log entries in my webhook service but when I create a new ingress
I get nothing. 我可以在集群中curl -k https://ingress-check-webhook-svc.operations/validate
并查看我的webhook服务中的日志条目,但是当我创建一个新的ingress
时却什么也没得到。 I can't seem to find any logs for the admission process - where is this logged, what else can I do? 我似乎找不到录取流程的任何日志-该日志记录在哪里,我还能做什么?
deleting and re-creating the config seems to have fixed my issue. 删除并重新创建配置似乎已解决了我的问题。 Maybe I didn't apply the api version change correctly. 也许我没有正确应用api版本更改。 Note kubectl describe
kubectl get events
and checking api logs didn't provide anything useful. 注意kubectl describe
kubectl get events
并且检查api日志没有提供任何有用的信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.