16.2. 환경에 대한 정보 얻기
AWS VPC 클러스터를 Outpost로 확장하려면 OpenShift Container Platform 클러스터 및 Outpost 환경에 대한 정보를 제공해야 합니다. 이 정보를 사용하여 네트워크 구성 작업을 완료하고 Outpost에 컴퓨팅 시스템을 생성하는 컴퓨팅 머신 세트를 구성합니다. 명령줄 툴을 사용하여 필요한 세부 정보를 수집할 수 있습니다.
16.2.1. OpenShift Container Platform 클러스터에서 정보 가져오기
OpenShift CLI(oc
)를 사용하여 OpenShift Container Platform 클러스터에서 정보를 가져올 수 있습니다.
export
명령을 사용하여 이러한 값의 일부 또는 모든 값을 환경 변수로 저장할 수 있습니다.
사전 요구 사항
- AWS의 사용자 지정 VPC에 OpenShift Container Platform 클러스터를 설치했습니다.
-
cluster-admin
권한이 있는 계정을 사용하여 클러스터에 액세스할 수 있습니다. -
OpenShift CLI(
oc
)가 설치되어 있습니다.
프로세스
다음 명령을 실행하여 클러스터의 인프라 ID를 나열합니다. 이 값을 유지합니다.
oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructures.config.openshift.io cluster
$ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructures.config.openshift.io cluster
Copy to Clipboard Copied! 다음 명령을 실행하여 설치 프로그램에서 생성한 컴퓨팅 머신 세트에 대한 세부 정보를 가져옵니다.
클러스터의 컴퓨팅 머신 세트를 나열합니다.
oc get machinesets.machine.openshift.io -n openshift-machine-api
$ oc get machinesets.machine.openshift.io -n openshift-machine-api
Copy to Clipboard Copied! 출력 예
NAME DESIRED CURRENT READY AVAILABLE AGE <compute_machine_set_name_1> 1 1 1 1 55m <compute_machine_set_name_2> 1 1 1 1 55m
NAME DESIRED CURRENT READY AVAILABLE AGE <compute_machine_set_name_1> 1 1 1 1 55m <compute_machine_set_name_2> 1 1 1 1 55m
Copy to Clipboard Copied! 나열된 컴퓨팅 머신 세트 중 하나에 대한 AMI(Amazon Machine Image) ID를 표시합니다. 이 값을 유지합니다.
oc get machinesets.machine.openshift.io <compute_machine_set_name_1> \ -n openshift-machine-api \ -o jsonpath='{.spec.template.spec.providerSpec.value.ami.id}'
$ oc get machinesets.machine.openshift.io <compute_machine_set_name_1> \ -n openshift-machine-api \ -o jsonpath='{.spec.template.spec.providerSpec.value.ami.id}'
Copy to Clipboard Copied! AWS VPC 클러스터의 서브넷 ID를 표시합니다. 이 값을 유지합니다.
oc get machinesets.machine.openshift.io <compute_machine_set_name_1> \ -n openshift-machine-api \ -o jsonpath='{.spec.template.spec.providerSpec.value.subnet.id}'
$ oc get machinesets.machine.openshift.io <compute_machine_set_name_1> \ -n openshift-machine-api \ -o jsonpath='{.spec.template.spec.providerSpec.value.subnet.id}'
Copy to Clipboard Copied!
16.2.2. AWS 계정에서 정보 가져오기
AWS CLI(aws
)를 사용하여 AWS 계정에서 정보를 가져올 수 있습니다.
export
명령을 사용하여 이러한 값의 일부 또는 모든 값을 환경 변수로 저장할 수 있습니다.
사전 요구 사항
- 필요한 하드웨어 설정이 완료된 AWS Outposts 사이트가 있습니다.
- Outpost는 AWS 계정과 연결되어 있습니다.
-
필요한 작업을 수행할 수 있는 권한이 있는 사용자로 AWS CLI(
aws
)를 사용하여 AWS 계정에 액세스할 수 있습니다.
프로세스
다음 명령을 실행하여 AWS 계정에 연결된 Outpost를 나열합니다.
aws outposts list-outposts
$ aws outposts list-outposts
Copy to Clipboard Copied! aws outposts list-outposts
명령의 출력에서 다음 값을 유지합니다.- Outpost ID입니다.
- Outpost의 Amazon 리소스 이름(ARN)입니다.
Outpost 가용성 영역입니다.
참고aws outposts list-outposts
명령의 출력에는AvailabilityZone
및AvailabilityZoneId
과 관련된 두 개의 값이 포함됩니다.AvailablilityZone
값을 사용하여 Outpost에 컴퓨팅 시스템을 생성하는 컴퓨팅 머신 세트를 구성합니다.
Outpost ID 값을 사용하여 다음 명령을 실행하여 Outpost에서 사용할 수 있는 인스턴스 유형을 표시합니다. 사용 가능한 인스턴스 유형의 값을 유지합니다.
aws outposts get-outpost-instance-types \ --outpost-id <outpost_id_value>
$ aws outposts get-outpost-instance-types \ --outpost-id <outpost_id_value>
Copy to Clipboard Copied! Outpost ARN 값을 사용하여 다음 명령을 실행하여 Outpost의 서브넷 ID를 표시합니다. 이 값을 유지합니다.
aws ec2 describe-subnets \ --filters Name=outpost-arn,Values=<outpost_arn_value>
$ aws ec2 describe-subnets \ --filters Name=outpost-arn,Values=<outpost_arn_value>
Copy to Clipboard Copied!