1.5. 네트워킹 정보
초기 부팅 중에 모든 호스트가 지원 서비스를 확인할 수 있도록 에이전트 ISO를 생성할 때 ndezvous IP 를 알고 있어야 합니다. DHCP(Dynamic Host Configuration Protocol) 서버를 사용하여 IP 주소를 할당하는 경우 배포된 컨트롤 플레인의 일부가 될 호스트 중 하나의 IP 주소로 rendezvousIP
필드를 설정해야 합니다. DHCP 서버가 없는 환경에서는 IP 주소를 정적으로 정의할 수 있습니다.
고정 IP 주소 외에도 NMState 형식의 모든 네트워크 구성을 적용할 수 있습니다. 여기에는 VLAN 및 NIC 본딩이 포함됩니다.
1.5.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 1
- 1
- rendezvous 호스트의 IP 주소입니다.
1.5.2. 정적 네트워킹
기본 방법:
install-config.yaml
및agent-config.yaml
agent-config.yaml.file 샘플
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
선택적 방법: ZTP 매니페스트
ZTP 사용자 정의 리소스의 선택적 방법은 6개의 사용자 지정 리소스로 구성됩니다.
nmstateconfig.yaml
파일에서 고정 IP를 구성할 수 있습니다.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
rendezvous IP는 config
필드에 지정된 고정 IP 주소에서 선택됩니다.