"x509: certificate signed by unknown authority" error occurred when creating pod in istio

9/2/2019

K8S version:1.14.2

Istio version:1.12.4

OS:CentOS 7

Following this guide, but error occurred.

https://istio.io/docs/examples/bookinfo/

$ kubectl describe rs details-v1-c5b5f496d
....
Events:
  Type     Reason        Age                   From                   Message
  ----     ------        ----                  ----                   -------
  Warning  FailedCreate  8m38s (x18 over 19m)  replicaset-controller  Error creating: Internal error occurred: failed calling webhook "sidecar-injector.istio.io": Post https://istio-sidecar-injector.istio-system.svc:443/inject?timeout=30s: x509: certificate signed by unknown authority
[root@centos-10-90-152-38 k8s]# kubectl get mutatingwebhookconfiguration istio-sidecar-injector -o yaml -o jsonpath='{.webhooks[0].clientConfig.caBundle}' | md5sum
7a67a48a97a2c079958225147a65d7cb  -
[root@centos-10-90-152-38 k8s]# kubectl -n istio-system get secret istio.istio-sidecar-injector-service-account -o jsonpath='{.data.root-cert\.pem}' | md5sum
7a67a48a97a2c079958225147a65d7cb  -
-- zhufeizzz
istio
kubernetes

1 Answer

9/3/2019

From istio.io:

"x509: certificate signed by unknown authority related errors are typically caused by an empty caBundle in the webhook configuration."

Troubleshooting tips are available in the link below:

istio.io: creating-configuration-fails-with-x509-certificate-errors

-- Danny Jackson
Source: StackOverflow