(O+P)ut

アウトプット



(O+P)ut

エンジニアのアウトプット

【Istio】istiod停止下ではError creating: Internal error occurredでPodが起動しない

スポンサーリンク

事象

Istioのコントロールプレーンである以下のDeploymentを停止した場合に

$ oc scale deployment/istiod-basic --replicas=0 -n istio-system
deployment.apps/istiod-basic scaled

Istiodで管理しているnamespaceのPodが正しく再起動されない。

$ oc get deployment -n istio-test
NAME             READY   UP-TO-DATE   AVAILABLE   AGE ...
ratings-v1       0/1     0            0           ...
環境情報
  • Openshift v4.6
  • Red Hat OpenShift Service Mesh(2.1.0-0 provided by Red Hat, Inc)Operator

原因/解決策

該当のReplicaSetにて以下エラーを確認。

Events:
  Type     Reason        Age                   From                   Message
  ----     ------        ----                  ----                   -------
  Warning  FailedCreate  54s (x15 over 2m16s)  replicaset-controller  Error creating: Internal error occurred: failed calling webhook
"sidecar-injector.istio.io": Post "https://istiod-basic.istio-system.svc:443/inject?timeout=10s": no endpoints available for service "
istiod-basic"

Istiodを復旧させた上で、該当のPodを再度起動すると正常に起動した。

$ oc rollout restart deployment ratings-v1 -n istio-test
deployment.apps/ratings-v1 restarted
Events:
  Type     Reason            Age                 From                   Message
  ----     ------            ----                ----                   -------
  Warning  FailedCreate      11m (x21 over 18m)  replicaset-controller  Error creating: Internal error occurred: failed calling webhoo
k "sidecar-injector.istio.io": Post "https://istiod-basic.istio-system.svc:443/inject?timeout=10s": no endpoints available for service
 "istiod-basic"
  Normal   SuccessfulCreate  2m3s                replicaset-controller  Created pod: ratings-v1-XX-XX
  Normal   SuccessfulDelete  116s                replicaset-controller  Deleted pod: ratings-v1-XX-XX

以下、補足です。

補足

コントロールプレーンであるistiodは停止しても通信自体は通りますが、Podの起動時にSidecarが付与されないことで正常起動しない事象が起きます。istiodが起動していれば以下のようにログが確認でき、正常にSidecarがInjectされます。

XX     info    ads     ADS: new connection for node:sidecar~172.30.189.XX~ratings-v1-XX-wf6s4.istio-test~istio-test.svc.cluster.local-11
XX     info    ads     CDS: PUSH for node:ratings-v1-XX-wf6s4.istio-test resources:48 size:42.5kB
XX     info    ads     EDS: PUSH for node:ratings-v1-XX-wf6s4.istio-test resources:38 size:6.4kB empty:0 cached:38/38
XX     info    ads     LDS: PUSH for node:ratings-v1-XX-wf6s4.istio-test resources:26 size:85.7kB
XX     info    ads     NDS: PUSH for node:ratings-v1-XX-wf6s4.istio-test resources:1 size:1.6kB
XX     info    ads     RDS: PUSH for node:ratings-v1-XX-wf6s4.istio-test resources:11 size:17.3kB
XX     info    ads     Push debounce stable[10] 1: 100.565372ms since last change, 100.559097ms since last push, full=false

以上です。