17.4.2. 단일 노드 OpenShift를 위한 이미지 기반 배포 정보
openshift-install 프로그램을 사용하여 구성 ISO를 수동으로 생성할 수 있습니다. 사전 설치된 대상 호스트에 구성 ISO를 연결하여 배포를 완료합니다.
17.4.2.1. openshift-install 프로그램을 사용하여 단일 노드 OpenShift 클러스터 배포 링크 복사링크가 클립보드에 복사되었습니다!
openshift-install 프로그램을 사용하여 이미지 기반 설치와 함께 사전 설치된 호스트를 구성하고 배포할 수 있습니다. 사이트별 세부 정보를 사용하여 대상 호스트를 구성하려면 다음 리소스를 생성해야 합니다.
-
install-config.yaml설치 매니페스트 -
image-based-config.yaml매니페스트
openshift-install 프로그램은 이러한 리소스를 사용하여 사전 설치된 대상 호스트에 연결하는 구성 ISO를 생성하여 배포를 완료합니다.
image-based-config.yaml 매니페스트의 사양에 대한 자세한 내용은 "이미지 기반-config.yaml 매니페스트에 대한 참조 사양"을 참조하십시오.
사전 요구 사항
- 이미지 기반 설치를 사용하여 단일 노드 OpenShift로 호스트를 사전 설치했습니다.
-
최신 버전의
openshift-install프로그램을 다운로드했습니다. - 가져오기 요청을 인증하는 풀 시크릿을 생성했습니다. 자세한 내용은 "이미지 풀 시크릿 사용"을 참조하십시오.
프로세스
다음을 실행하여 작업 디렉터리를 생성합니다.
$ mkdir <working_directory>여기서
<working_directory>는 작업 디렉터리의 이름입니다(예:ibi-config-iso-workdir).설치 매니페스트를 생성합니다.
다음 예와 같이
install-config매니페스트를 정의하는 YAML 파일을 생성합니다.apiVersion: v1 metadata: name: sno-cluster-name baseDomain: host.example.com compute: - architecture: amd64 hyperthreading: Enabled name: worker replicas: 0 controlPlane: architecture: amd64 hyperthreading: Enabled name: master replicas: 1 networking: machineNetwork: - cidr: 192.168.200.0/24 #- cidr: fd01::/64 platform: none: {} fips: false cpuPartitioningMode: "AllNodes" pullSecret: '{"auths":{"<your_pull_secret>"}}}' sshKey: 'ssh-rsa <your_ssh_pub_key>'+ 듀얼 스택 네트워킹의 경우
machineNetwork필드에서 목록 형식을 사용하여 IPv4 및 IPv6 CIDR을 둘 다 지정할 수 있습니다. 목록의 첫 번째 CIDR은 기본 주소 제품군이며 시드 클러스터의 기본 주소 제품군과 일치해야 합니다.중요클러스터 배포에 프록시 구성이 필요한 경우 다음을 수행해야 합니다.
- 프록시 구성을 제공하는 시드 클러스터에서 시드 이미지를 생성합니다. 프록시 구성이 일치하지 않아도 됩니다.
-
설치 매니페스트에서
machineNetwork필드를 구성합니다.
- 파일을 작업 디렉터리에 저장합니다.
선택 사항입니다. 다음 명령을 실행하여 작업 디렉터리에 구성 템플릿을 생성합니다.
$ openshift-install image-based create config-template --dir ibi-config-iso-workdir/출력 예:
INFO Config-Template created in: ibi-config-iso-workdir이 명령은 작업 디렉터리에
image-based-config.yaml구성 템플릿을 생성합니다.# # Note: This is a sample ImageBasedConfig file showing # which fields are available to aid you in creating your # own image-based-config.yaml file. # apiVersion: v1beta1 kind: ImageBasedConfig metadata: name: example-image-based-config additionalNTPSources: - 0.rhel.pool.ntp.org - 1.rhel.pool.ntp.org hostname: change-to-hostname releaseRegistry: quay.io # networkConfig contains the network configuration for the host in NMState format. # See https://nmstate.io/examples.html for examples. networkConfig: interfaces: - name: eth0 type: ethernet state: up mac-address: 00:00:00:00:00:00 ipv4: enabled: true address: - ip: 192.168.122.2 prefix-length: 23 dhcp: false구성 파일을 편집합니다.
image-based-config.yaml파일의 예:# # Note: This is a sample ImageBasedConfig file showing # which fields are available to aid you in creating your # own image-based-config.yaml file. # apiVersion: v1beta1 kind: ImageBasedConfig metadata: name: sno-cluster-name additionalNTPSources: - 0.rhel.pool.ntp.org - 1.rhel.pool.ntp.org hostname: host.example.com releaseRegistry: quay.io # networkConfig contains the network configuration for the host in NMState format. # See https://nmstate.io/examples.html for examples. networkConfig: interfaces: - name: ens1f0 type: ethernet state: up ipv4: enabled: true dhcp: false auto-dns: false address: - ip: 192.168.200.25 prefix-length: 24 ipv6: enabled: false dns-resolver: config: server: - 192.168.15.47 - 192.168.15.48 routes: config: - destination: 0.0.0.0/0 metric: 150 next-hop-address: 192.168.200.254 next-hop-interface: ens1f0다음 명령을 실행하여 작업 디렉터리에 구성 ISO를 생성합니다.
$ openshift-install image-based create config-image --dir ibi-config-iso-workdir/출력 예:
INFO Adding NMConnection file <ens1f0.nmconnection> INFO Consuming Install Config from target directory INFO Consuming Image-based Config ISO configuration from target directory INFO Config-Image created in: ibi-config-iso-workdir/auth작업 디렉터리의 출력을 확인합니다.
출력 예:
ibi-config-iso-workdir/ ├── auth │ ├── kubeadmin-password │ └── kubeconfig └── imagebasedconfig.iso-
기본 방법을 사용하여 사전 설치된 호스트에
imagebasedconfig.iso를 연결하고 호스트를 다시 시작하여 구성 프로세스를 완료하고 클러스터를 배포합니다.
검증
호스트 구성 프로세스가 완료되면 클러스터에 액세스하여 상태를 확인합니다.
다음 명령을 실행하여
kubeconfig환경 변수를 kubeconfig 파일로 내보냅니다.$ export KUBECONFIG=ibi-config-iso-workdir/auth/kubeconfig다음 명령을 실행하여 클러스터가 응답하는지 확인합니다.
$ oc get nodes출력 예:
NAME STATUS ROLES AGE VERSION node/sno-cluster-name.host.example.com Ready control-plane,master 5h15m v1.35.4
17.4.2.1.1. image-based-config.yaml 매니페스트에 대한 참조 사양 링크 복사링크가 클립보드에 복사되었습니다!
다음 내용은 image-based-config.yaml 매니페스트의 사양을 설명합니다.
openshift-install 프로그램은 image-based-config.yaml 매니페스트를 사용하여 단일 노드 OpenShift의 이미지 기반 배포용 사이트별 구성 ISO를 생성합니다.
| 사양 | 유형 | 설명 |
|---|---|---|
|
|
| 단일 노드 OpenShift 클러스터의 노드 이름을 정의합니다. |
| 사양 | 유형 | 설명 |
|---|---|---|
|
|
| 호스트에 대한 네트워킹 구성을 지정합니다. 예를 들면 다음과 같습니다.
정적 네트워킹이 필요한 경우 라이브 설치 ISO를 생성하는 호스트에 중요 인터페이스 이름은 운영 체제에 표시된 대로 실제 NIC 이름과 일치해야 합니다. |
|
|
| 모든 클러스터 호스트의 NTP 소스 목록을 지정합니다. 이러한 NTP 소스는 클러스터의 기존 NTP 소스에 추가됩니다. NTP 소스에 호스트 이름 또는 IP 주소를 사용할 수 있습니다. |
|
|
| seed 클러스터의 릴리스 이미지에 사용한 컨테이너 이미지 레지스트리를 지정합니다. |
|
|
| 단일 노드 OpenShift 노드의 사용자 정의 노드 레이블을 지정합니다. 예를 들면 다음과 같습니다.
|