Configuration Validation Problems
The most commonly reported problems with configuration are YAML indentation and array notation (-
) mistakes.
Manually verify your configuration is correct, cross-referencing when necessary.
Verify the istiod-istio-system
validationwebhookconfiguration
exists and is correct. The apiVersion
, apiGroup
, and resource
of the invalid configuration should be listed in one of the two webhooks
entries.
If the validatingwebhookconfiguration
doesn’t exist, verify the istio-validation
configmap
exists. Istio uses the data from this configmap to create and update the validatingwebhookconfiguration
.
$ kubectl -n istio-system get configmap istio-validation -o jsonpath='{.data}'
map[config:apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: istiod-istio-system
namespace: istio-system
labels:
app: istiod
release: istio
istio: istiod
webhooks:
- name: validation.istio.io
clientConfig:
service:
name: istiod
namespace: istio-system
caBundle: ""
rules:
- operations:
- CREATE
- UPDATE
apiGroups:
- config.istio.io
- rbac.istio.io
- security.istio.io
- authentication.istio.io
- networking.istio.io
apiVersions:
- "*"
resources:
- "*"
failurePolicy: Fail
sideEffects: None]
(... snip ...)
The validation configuration is fail-close. If configuration exists and is scoped properly, the webhook will be invoked. A missing caBundle
, bad certificate, or network connectivity problem will produce an error message when the resource is created/updated. If you don’t see any error message and the webhook wasn’t invoked and the webhook configuration is valid, your cluster is misconfigured.
x509: certificate signed by unknown authority
related errors are typically caused by an empty caBundle
in the webhook configuration. Verify that it is not empty (see verify webhook configuration). Istio consciously reconciles webhook configuration used the istio-validation
configmap
and root certificate.
Verify the
istiod
pod(s) are running:$ kubectl -n istio-system get pod -lapp=istiod
Check the pod logs for errors. Failing to patch the
caBundle
should print an error.-
$ kubectl get clusterrole istiod-istio-system -o yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
name: istiod-istio-system
rules:
- apiGroups:
- admissionregistration.k8s.io
resources:
- validatingwebhookconfigurations
verbs:
- '*'
Istio needs
validatingwebhookconfigurations
write access to create and update thevalidatingwebhookconfiguration
.
Validation is fail-close. If the istiod
pod is not ready, configuration cannot be created and updated. In such cases you’ll see an error about no endpoints available
.
Verify the istiod
pod(s) are running and endpoints are ready.
$ kubectl -n istio-system get pod -lapp=istiod
NAME READY STATUS RESTARTS AGE
istiod-5dbbbdb746-d676g 1/1 Running 0 2d
If the pods or endpoints aren’t ready, check the pod logs and status for any indication about why the webhook pod is failing to start and serve traffic.
$ for pod in $(kubectl -n istio-system get pod -lapp=istiod -o jsonpath='{.items[*].metadata.name}'); do \
kubectl -n istio-system logs ${pod} \
done
$ for pod in $(kubectl -n istio-system get pod -lapp=istiod -o name); do \
kubectl -n istio-system describe ${pod} \