1.6. ネットワークの概要
最初の起動時にすべてのホストが支援サービスにチェックインできるように、ランデブー IP はエージェント ISO の生成時に認識されている必要があります。IP アドレスが動的ホスト設定プロトコル (DHCP) サーバーを使用して割り当てられている場合、rendezvousIP
フィールドは、デプロイメントされたコントロールプレーンの一部になるホストの 1 つの IP アドレスに設定する必要があります。DHCP サーバーがない環境では、IP アドレスを静的に定義できます。
静的 IP アドレスに加えて、NMState 形式の任意のネットワーク設定を適用できます。これには、VLAN と NIC ボンディングが含まれます。
1.6.1. DHCP
推奨される方法: install-config.yaml
および agent-config.yaml
rendezvousIP
フィールドの値を指定する必要があります。networkConfig
フィールドは空白のままにすることができます。
agent-config.yaml.file のサンプル
apiVersion: v1alpha1 kind: AgentConfig metadata: name: sno-cluster rendezvousIP: 192.168.111.80
apiVersion: v1alpha1
kind: AgentConfig
metadata:
name: sno-cluster
rendezvousIP: 192.168.111.80
- 1
- ランデブーホストの IP アドレス。
1.6.2. 静的ネットワーキング
推奨される方法:
install-config.yaml
およびagent-config.yaml
agent-config.yaml.file のサンプル
Copy to Clipboard Copied! Toggle word wrap Toggle overflow cat > agent-config.yaml << EOF apiVersion: v1alpha1 kind: AgentConfig metadata: name: sno-cluster rendezvousIP: 192.168.111.80 hosts: - hostname: master-0 interfaces: - name: eno1 macAddress: 00:ef:44:21:e6:a5 networkConfig: interfaces: - name: eno1 type: ethernet state: up mac-address: 00:ef:44:21:e6:a5 ipv4: enabled: true address: - ip: 192.168.111.80 prefix-length: 23 dhcp: false dns-resolver: config: server: - 192.168.111.1 routes: config: - destination: 0.0.0.0/0 next-hop-address: 192.168.111.1 next-hop-interface: eno1 table-id: 254 EOF
cat > agent-config.yaml << EOF apiVersion: v1alpha1 kind: AgentConfig metadata: name: sno-cluster rendezvousIP: 192.168.111.80
1 hosts: - hostname: master-0 interfaces: - name: eno1 macAddress: 00:ef:44:21:e6:a5
2 networkConfig: interfaces: - name: eno1 type: ethernet state: up mac-address: 00:ef:44:21:e6:a5 ipv4: enabled: true address: - ip: 192.168.111.80
3 prefix-length: 23
4 dhcp: false dns-resolver: config: server: - 192.168.111.1
5 routes: config: - destination: 0.0.0.0/0 next-hop-address: 192.168.111.1
6 next-hop-interface: eno1 table-id: 254 EOF
- 1
rendezvousIP
フィールドに値が指定されていない場合、networkConfig
フィールドで指定された静的 IP アドレスから 1 つのアドレスが選択されます。- 2
- 設定を適用するホストを決定するために使用される、ホスト上のインターフェイスの MAC アドレス。
- 3
- ターゲットのベアメタルホストの静的 IP アドレス。
- 4
- ターゲットのベアメタルホストの静的 IP アドレスのサブネット接頭辞。
- 5
- ターゲットのベアメタルホストの DNS サーバー。
- 6
- ノードトラフィックのネクストホップアドレス。これは、指定されたインターフェイスに設定される IP アドレスと同じサブネットにある必要があります。
オプションの方法: GitOps ZTP マニフェスト
GitOps ZTP カスタムリソースのオプションの方法は、6 つのカスタムリソースで構成されます。静的 IP は
nmstateconfig.yaml
で設定できます。Copy to Clipboard Copied! Toggle word wrap Toggle overflow apiVersion: agent-install.openshift.io/v1beta1 kind: NMStateConfig metadata: name: master-0 namespace: openshift-machine-api labels: cluster0-nmstate-label-name: cluster0-nmstate-label-value spec: config: interfaces: - name: eth0 type: ethernet state: up mac-address: 52:54:01:aa:aa:a1 ipv4: enabled: true address: - ip: 192.168.122.2 prefix-length: 23 dhcp: false dns-resolver: config: server: - 192.168.122.1 routes: config: - destination: 0.0.0.0/0 next-hop-address: 192.168.122.1 next-hop-interface: eth0 table-id: 254 interfaces: - name: eth0 macAddress: 52:54:01:aa:aa:a1
apiVersion: agent-install.openshift.io/v1beta1 kind: NMStateConfig metadata: name: master-0 namespace: openshift-machine-api labels: cluster0-nmstate-label-name: cluster0-nmstate-label-value spec: config: interfaces: - name: eth0 type: ethernet state: up mac-address: 52:54:01:aa:aa:a1 ipv4: enabled: true address: - ip: 192.168.122.2
1 prefix-length: 23
2 dhcp: false dns-resolver: config: server: - 192.168.122.1
3 routes: config: - destination: 0.0.0.0/0 next-hop-address: 192.168.122.1
4 next-hop-interface: eth0 table-id: 254 interfaces: - name: eth0 macAddress: 52:54:01:aa:aa:a1
5
ランデブー IP は、config
フィールドで指定された静的 IP アドレスから選択されます。