2.6.2. vSphere에서 머신 세트 사용자 정의 리소스의 샘플 YAML
이 샘플 YAML은 VMware vSphere에서 실행되는 머신 세트를 정의하고 node-role.kubernetes.io/<role>: ""로 레이블이 지정된 노드를 만듭니다.
이 샘플에서 <infrastructure_id>는 클러스터를 프로비저닝할 때 설정한 클러스터 ID를 기반으로 하는 인프라 ID 레이블이며 <role>은 추가할 노드 레이블입니다.
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
creationTimestamp: null
labels:
machine.openshift.io/cluster-api-cluster: <infrastructure_id>
name: <infrastructure_id>-<role>
namespace: openshift-machine-api
spec:
replicas: 1
selector:
matchLabels:
machine.openshift.io/cluster-api-cluster: <infrastructure_id>
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role>
template:
metadata:
creationTimestamp: null
labels:
machine.openshift.io/cluster-api-cluster: <infrastructure_id>
machine.openshift.io/cluster-api-machine-role: <role>
machine.openshift.io/cluster-api-machine-type: <role>
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role>
spec:
metadata:
creationTimestamp: null
labels:
node-role.kubernetes.io/<role>: ""
providerSpec:
value:
apiVersion: vsphereprovider.openshift.io/v1beta1
credentialsSecret:
name: vsphere-cloud-credentials
diskGiB: 120
kind: VSphereMachineProviderSpec
memoryMiB: 8192
metadata:
creationTimestamp: null
network:
devices:
- networkName: "<vm_network_name>"
numCPUs: 4
numCoresPerSocket: 1
snapshot: ""
template: <vm_template_name>
userDataSecret:
name: worker-user-data
workspace:
datacenter: <vcenter_datacenter_name>
datastore: <vcenter_datastore_name>
folder: <vcenter_vm_folder_path>
resourcepool: <vsphere_resource_pool>
server: <vcenter_server_ip>
- 1 3 5
- 클러스터를 프로비저닝할 때 설정한 클러스터 ID를 기반으로하는 인프라 ID를 지정합니다. OpenShift CLI (
oc) 패키지가 설치되어 있으면 다음 명령을 실행하여 인프라 ID를 얻을 수 있습니다.$ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster - 2 4 8
- 인프라 ID 및 노드 레이블을 지정합니다.
- 6 7 9
- 추가할 노드 레이블을 지정합니다.
- 10
- 머신 세트를 배포할 vSphere VM 네트워크를 지정합니다. 이 VM 네트워크는 다른 컴퓨팅 시스템이 클러스터에 있는 위치여야 합니다.
- 11
- 사용할 템플릿의 vSphere VM 복제(예:
user-5ddjd-rhcos)를 지정합니다.중요원래 VM 템플릿을 지정하지 마십시오. VM 템플릿이 꺼져 있어야 하며 새 RHCOS 머신에 대해 복제해야 합니다. VM 템플릿을 시작하면 VM 템플릿이 플랫폼의 VM으로 구성되므로 시스템 세트가 구성을 적용할 수 있는 템플릿으로 사용되지 않습니다.
- 12
- 머신 세트를 배포할 vCenter Datacenter를 지정합니다.
- 13
- 머신 세트를 배포할 vCenter Datastore를 지정합니다.
- 14
- vCenter의 vSphere VM 폴더에 경로(예:
/dc1/vm/user-inst-5ddjd)를 지정합니다. - 15
- VM의 vSphere 리소스 풀을 지정합니다.
- 16
- vCenter 서버 IP 또는 정규화된 도메인 이름을 지정합니다.