7.4. OpenStackNetConfig를 사용하여 오버클라우드 컨트롤 플레인 네트워크 생성
OpenStackNetConfig에서 오버클라우드에 대해 하나 이상의 컨트롤 플레인 네트워크를 정의해야 합니다. 네트워크 정의에는 IP 주소 할당 외에도 OpenStackNetAttachment의 매핑 정보가 포함됩니다. OpenShift Virtualization에서는 이 정보를 사용하여 모든 가상 머신을 네트워크에 연결합니다.
사전 요구 사항
- OpenShift Container Platform 클러스터가 작동하고 director Operator가 올바르게 설치되었는지 확인합니다.
-
워크스테이션에
oc
명령줄 툴을 설치했는지 확인합니다.
절차
워크스테이션에
osnetconfig.yaml
이라는 파일을 생성합니다.ctlplane
이라는 컨트롤 플레인 네트워크의 리소스 사양을 포함합니다. 예를 들어 각 작업자 노드에서enp6s0
이더넷 장치에 연결된 Linux 브리지를 사용하는 컨트롤 플레인의 사양은 다음과 같습니다.apiVersion: osp-director.openstack.org/v1beta1 kind: OpenStackNetConfig metadata: name: openstacknetconfig spec: attachConfigurations: br-osp: nodeNetworkConfigurationPolicy: nodeSelector: node-role.kubernetes.io/worker: "" desiredState: interfaces: - bridge: options: stp: enabled: false port: - name: enp6s0 description: Linux bridge with enp6s0 as a port name: br-osp state: up type: linux-bridge mtu: 1500 # optional DnsServers list dnsServers: - 192.168.25.1 # optional DnsSearchDomains list dnsSearchDomains: - osptest.test.metalkube.org - some.other.domain # DomainName of the OSP environment domainName: osptest.test.metalkube.org networks: - name: Control nameLower: ctlplane subnets: - name: ctlplane ipv4: allocationEnd: 172.22.0.250 allocationStart: 172.22.0.100 cidr: 172.22.0.0/24 gateway: 172.22.0.1 attachConfiguration: br-osp # optional: configure static mapping for the networks per nodes. If there is none, a random gets created reservations: controller-0: ipReservations: ctlplane: 172.22.0.120 compute-0: ipReservations: ctlplane: 172.22.0.140
네트워크 사양에 다음 값을 설정합니다.
name
- 컨트롤인 컨트롤 플레인 네트워크의 이름으로 설정합니다.
nameLower
- ctlplane인 컨트롤 플레인 네트워크의 하위 이름으로 설정합니다.
subnets
- 서브넷 사양을 설정합니다.
subnets.name
- 컨트롤 플레인 서브넷의 이름을 설정합니다. ctlplane입니다.
subnets.attachConfiguration
- 연결 구성을 사용해야 하는 참조를 설정합니다.
subnets.ipv4
- allocationStart, allocationEnd, cidr, gateway 및 선택적 경로 목록(대상 및 다음ECDHE 포함)이 포함된 ipv4 서브넷의 세부 정보
이 섹션에서 사용할 수 있는 값에 대한 설명을 보려면
openstacknetconfig
CRD의 사용자 정의 리소스 정의에서 사양 스키마를 확인합니다.$ oc describe crd openstacknetconfig
네트워크 사양 구성을 완료하면 파일을 저장합니다.
컨트롤 플레인 네트워크를 생성합니다.
$ oc create -f osnetconfig.yaml -n openstack
검증
컨트롤 플레인 네트워크의 리소스를 확인합니다.
$ oc get openstacknetconfig/openstacknetconfig