Resolve common issues with the ESI Pod Webhook.
MutatingWebhookConfiguration
:
MutatingWebhookConfiguration
for esi-pod-webhook
exists:
clientConfig.service
: Verify name
, namespace
, and port
point to the correct ESI Pod Webhook service (usually esi-pod-webhook-service
in secretless-system
on port 443
, which maps to the webhook’s target port, e.g., 8443
).rules.operations
: Should include CREATE
and UPDATE
for pods.namespaceSelector
/ objectSelector
: Ensure these selectors are not unintentionally excluding the namespace or pods you are targeting. If they are too restrictive, the API server won’t send admission requests to the webhook for those pods.failurePolicy
: Usually Fail
for critical webhooks, but could be Ignore
. If Ignore
, errors during webhook invocation might not be immediately obvious.caBundle
: This should be populated by cert-manager
(or manually if not using cert-manager
) and match the CA of the certificate used by the webhook service.secretless.externalsecrets.com/externalsecret
and either secretless.externalsecrets.com/env-vars: "true"
or secretless.externalsecrets.com/file-secrets: "true"
.skip
Annotation:
secretless.externalsecrets.com/skip: "true"
if you expect it to be processed.MutatingWebhookConfiguration
caBundle
might be missing or incorrect.cert-manager
Status:
cert-manager
pods are running and healthy in their namespace (usually cert-manager
):
Certificate
Resource:
Certificate
resource created for the webhook (e.g., esi-pod-webhook-cert
in secretless-system
):
Status.Conditions
like Ready: True
. If not ready, check events on the Certificate
and related CertificateRequest
or Order
resources for errors from your Issuer
or ClusterIssuer
.cert-manager
) into the paths specified by --tls-cert
and --tls-key
arguments (e.g., /etc/webhook/certs/tls.crt
, /etc/webhook/certs/tls.key
)./secrets/secrets.json
file is missing/empty.ExternalSecret
, problems with esi-cli
, or other processing errors.
env-vars: "true"
):
secretless-init
by default) was injected, check its logs. This is where esi-cli
runs.
esi-cli
related to fetching the ExternalSecret
, connecting to a federated server, or issues with the specified secret store.file-secrets: "true"
):
secretless-sidecar
by default) was injected, check its logs.
esi-cli
daemon mode activity, including attempts to fetch and write secrets.file-secrets: "true"
):
/secrets
directory:
ExternalSecret
Status:
ExternalSecret
resource specified in the pod’s annotation (secretless.externalsecrets.com/externalsecret
) exists in the same namespace as the pod.Status.Condition
of type Ready
with Status: True
. If not, troubleshoot the ExternalSecret
itself (e.g., issues with its SecretStore
, permissions, or the external provider).ClusterRole
bound to the webhook’s ServiceAccount
(e.g., esi-pod-webhook-sa
in secretless-system
) has sufficient permissions to:
get
, list
, watch
ExternalSecret
resources cluster-wide (or at least in namespaces it needs to operate on, though cluster-wide is common for webhooks).get
, list
, watch
SecretStore
and ClusterSecretStore
resources.esi-cli
features that interact with other Kubernetes resources.esi-cli
Image Issues:
--init-image
or --sidecar-image
in the webhook deployment, ensure these images are correctly built, contain a compatible esi-cli
, and are accessible from your Kubernetes nodes (check image pull errors on the pod if image-pull-secrets
are needed but not configured via annotation).