(O+P)ut

アウトプット



(O+P)ut

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

【OpenShift】opensift-install時にwaiting for the Kubernetes APIで進まない事象

スポンサーリンク

事象

以下コマンドにてOpenshiftをインストールする際に

# openshift-install wait-for bootstrap-complete --log-level=debug

以下のメッセージが繰り返されてインストールが進まず

DEBUG Still waiting for the Kubernetes API: Get https://api-server:6443/version?timeout=32s: EOF
DEBUG Still waiting for the Kubernetes API: Get https://api-server:6443/version?timeout=32s: EOF
DEBUG Still waiting for the Kubernetes API: Get https://api-server:6443/version?timeout=32s: EOF
DEBUG Still waiting for the Kubernetes API: Get https://api-server:6443/version?timeout=32s: EOF

最後には以下メッセージで失敗する。

ERROR Attempted to gather ClusterOperator status after wait failure: listing ClusterOperator objects: Get https://api-server:6443/apis/config.openshift.io/v1/clusteroperators: EOF
環境情報
  • openshift v4
  • VMWare
参考


原因/対応策

bootstrap/master/workerノードが正しく準備されていない可能性がある。

例えば、nodesguestinfo.ignition.config.dataの値に追加する暗号が誤っている、等。
その場合はappend-bootstrap.64の値が正しく仮想マシンの「Edit Settings... > VM Options > Advanced > EDIT CONFIGRATION...」のguestinfo.ignition.config.data欄に登録されているかを確認する。

f:id:mtiit:20201013232231p:plain
vCenterのGUI上での画面例

各ノードが正常に準備ができれば以下のようにBootstrap Completeという文言が表示される。

# openshift-install wait-for bootstrap-complete --log-level=debug
DEBUG OpenShift Installer 4.X.X
DEBUG Built from commit ...
INFO Waiting up to 20m0s for the Kubernetes API at https://api-server:6443...
INFO API v1.18.X ... up
INFO Waiting up to 40m0s for bootstrapping to complete...
DEBUG Bootstrap status: complete
INFO It is now safe to remove the bootstrap resources
DEBUG Time elapsed per stage:
DEBUG Bootstrap Complete: 3m50s
INFO Time elapsed: 3m50s

以下、補足です。

補足

VMWare(vCenter)を利用したインストールは、create ignition-configsで作成した各々のignファイルをベースにして

# openshift-install create ignition-configs
..
.
├── auth
│   ├── kubeadmin-password
│   └── kubeconfig
├── bootstrap.ign
├── master.ign
├── metadata.json
└── worker.ign

vSphereの仮想マシンに渡すイグニッションファイルのbase64エンコーディングを作成します。

# base64 -w0 append-bootstrap.ign > append-bootstrap.64

このファイルが誤った状態で仮想マシンを作成/起動すると仮想マシンが動いていない際に記載した事象が起きました。
一見api-server(実体はinstaller用ノード)が原因のように見えて、別の仮想マシンの不具合が起因している可能性もあるのでご注意ください。