7.3. インストール後の Ignition 設定の変更

machine config pool はノードのクラスターおよびそれらの対応するmachine config を管理します。machine config にはクラスターの設定情報が含まれます。既知のすべての machine config pool を一覧表示するには、以下を実行します。

$ oc get machineconfigpools

出力例

NAME   CONFIG                                  UPDATED UPDATING DEGRADED
master master-1638c1aea398413bb918e76632f20799 False   False    False
worker worker-2feef4f8288936489a5a832ca8efe953 False   False    False

すべての machine config を一覧表示するには、以下を実行します。

$ oc get machineconfig

出力例

NAME                                      GENERATEDBYCONTROLLER   IGNITIONVERSION   CREATED   OSIMAGEURL

00-master                                 4.0.0-0.150.0.0-dirty   3.2.0             16m
00-master-ssh                             4.0.0-0.150.0.0-dirty                     16m
00-worker                                 4.0.0-0.150.0.0-dirty   3.2.0             16m
00-worker-ssh                             4.0.0-0.150.0.0-dirty                     16m
01-master-kubelet                         4.0.0-0.150.0.0-dirty   3.2.0             16m
01-worker-kubelet                         4.0.0-0.150.0.0-dirty   3.2.0             16m
master-1638c1aea398413bb918e76632f20799   4.0.0-0.150.0.0-dirty   3.2.0             16m
worker-2feef4f8288936489a5a832ca8efe953   4.0.0-0.150.0.0-dirty   3.2.0             16m

Machine Config Operator が Machineconfig を適用するときの動作は Ignition とは若干異なります。machine config は (00* から 99* までの) 順序で読み取られます。machine config 内のラベルは、それぞれのノードのタイプ (マスターまたはワーカー) を特定します。同じファイルが複数の machine config ファイルに表示される場合、最後のファイルが有効になります。たとえば、99* ファイルに出現するファイルは、00* ファイルに出現する同一のファイルを置き換えます。入力された MachineConfig オブジェクトはレンダリングされた MachineConfig オブジェクトに結合されます。これは Operator のターゲットとして使用され、machine config pool で確認できる値です。

マシン設定から管理されているファイルを表示するには、特定の MachineConfig オブジェクト内で “Path:" を検索します。以下に例を示します。

$ oc describe machineconfigs 01-worker-container-runtime | grep Path:

出力例

            Path:            /etc/containers/registries.conf
            Path:            /etc/containers/storage.conf
            Path:            /etc/crio/crio.conf

machine config ファイルには (10-worker-container-runtime などの) より新しい名前を付けてください。各ファイルの内容については、URL 形式のデータであることに留意してください。次に、新しい machine config をクラスターに適用します。