第4章 installer-provisioned のインストール後の設定
installer-provisioned クラスターを正常にデプロイしたら、以下のインストール後の手順を考慮してください。
4.1. 非接続クラスター向けの NTP 設定 リンクのコピーリンクがクリップボードにコピーされました!
OpenShift Container Platform は、クラスターノードに chrony Network Time Protocol (NTP) サービスをインストールします。
OpenShift Container Platform のノードは、適切に実行するために日付と時刻が一致している必要があります。コンピュートノードがコントロールプレーンノード上の NTP サーバーから日付と時刻を取得すると、ルーティング可能なネットワークに接続していないために上位層の NTP サーバーにアクセスできないクラスターのインストールと操作が可能になります。
手順
次のコマンドを使用して、インストールホストに Butane をインストールします。
$ sudo dnf -y install butaneコントロールプレーンノードの
chrony.confファイルのコンテンツを含む Butane 設定 (99-master-chrony-conf-override.bu) を作成します。注記Butane の詳細は、「Butane を使用したマシン設定の作成」を参照してください。
Butane 設定例
variant: openshift version: 4.18.0 metadata: name: 99-master-chrony-conf-override labels: machineconfiguration.openshift.io/role: master storage: files: - path: /etc/chrony.conf mode: 0644 overwrite: true contents: inline: | # Use public servers from the pool.ntp.org project. # Please consider joining the pool (https://www.pool.ntp.org/join.html). # The Machine Config Operator manages this file server openshift-master-0.<cluster-name>.<domain> iburst1 server openshift-master-1.<cluster-name>.<domain> iburst server openshift-master-2.<cluster-name>.<domain> iburst stratumweight 0 driftfile /var/lib/chrony/drift rtcsync makestep 10 3 bindcmdaddress 127.0.0.1 bindcmdaddress ::1 keyfile /etc/chrony.keys commandkey 1 generatecommandkey noclientlog logchange 0.5 logdir /var/log/chrony # Configure the control plane nodes to serve as local NTP servers # for all compute nodes, even if they are not in sync with an # upstream NTP server. # Allow NTP client access from the local network. allow all # Serve time even if not synchronized to a time source. local stratum 3 orphan- 1
<cluster-name>はクラスターの名前に置き換え、<domain>は完全修飾ドメイン名に置き換える必要があります。
Butane を使用して、コントロールプレーンノードに配信される設定が含まれる
MachineConfigオブジェクトファイル (99-master-chrony-conf-override.yaml) を生成します。$ butane 99-master-chrony-conf-override.bu -o 99-master-chrony-conf-override.yamlコントロールプレーンノード上の NTP サーバーを参照するコンピュートノードの
chrony.confファイルの内容を含む Butane 設定99-worker-chrony-conf-override.buを作成します。Butane 設定例
variant: openshift version: 4.18.0 metadata: name: 99-worker-chrony-conf-override labels: machineconfiguration.openshift.io/role: worker storage: files: - path: /etc/chrony.conf mode: 0644 overwrite: true contents: inline: | # The Machine Config Operator manages this file. server openshift-master-0.<cluster-name>.<domain> iburst1 server openshift-master-1.<cluster-name>.<domain> iburst server openshift-master-2.<cluster-name>.<domain> iburst stratumweight 0 driftfile /var/lib/chrony/drift rtcsync makestep 10 3 bindcmdaddress 127.0.0.1 bindcmdaddress ::1 keyfile /etc/chrony.keys commandkey 1 generatecommandkey noclientlog logchange 0.5 logdir /var/log/chrony- 1
<cluster-name>はクラスターの名前に置き換え、<domain>は完全修飾ドメイン名に置き換える必要があります。
Butane を使用して、ワーカーノードに配信される設定が含まれる
MachineConfigオブジェクトファイル (99-worker-chrony-conf-override.yaml) を生成します。$ butane 99-worker-chrony-conf-override.bu -o 99-worker-chrony-conf-override.yaml