apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  name: "k8s-validating-webhook"
webhooks:
- name: "k8s-validating-webhook.a2ush.local"
  failurePolicy: Fail
  rules:
  - apiGroups: [""]
    operations: ["CREATE"]
    apiVersions: ["v1"]
    resources: ["pods"]
    scope: "Namespaced"
  clientConfig:
    caBundle: YOUR_ENCODED_SERVER_CRT ## cat server.crt | base64 -w 0
    service:
      namespace: default
      name: k8s-webhook
      path: /validate
  admissionReviewVersions: ["v1", "v1beta1"]
  timeoutSeconds: 5
  sideEffects: None