다음 표에서는 단일 마스터 (동일한 호스트에서 정적 포드로 실행되는 단일 etcd 인스턴스 포함), 사용자 애플리케이션을 호스팅하는 데 사용되는 두 노드, 전용 인프라 호스팅을 위한 node-role.kubernetes.io/infra=true 라벨이 있는 두 개의 노드에 대해 설명합니다.
Expand
호스트 이름
설치할 구성 요소/역할
master.example.com
master, etcd 및 노드
node1.example.com
컴퓨팅 노드
node2.example.com
infra-node1.example.com
인프라 노드
infra-node2.example.com
다음 예제 인벤토리 파일의 [masters], [etcd], [nodes] 섹션에 있는 예제 호스트를 볼 수 있습니다.
단일 마스터, 단일 etcd 및 여러 노드 인벤토리 파일
Create an OSEv3 group that contains the masters, nodes, and etcd groups
Set variables common for all OSEv3 hosts
SSH user, this user should allow ssh based auth without requiring a password
If ansible_ssh_user is not root, ansible_become must be set to true
uncomment the following to enable htpasswd authentication; defaults to DenyAllPasswordIdentityProvider
host group for masters
host group for etcd
host group for nodes, includes region info
# Create an OSEv3 group that contains the masters, nodes, and etcd groups
[OSEv3:children]
masters
nodes
etcd
# Set variables common for all OSEv3 hosts
[OSEv3:vars]
# SSH user, this user should allow ssh based auth without requiring a password
ansible_ssh_user=root
# If ansible_ssh_user is not root, ansible_become must be set to true
#ansible_become=true
openshift_deployment_type=openshift-enterprise
# uncomment the following to enable htpasswd authentication; defaults to DenyAllPasswordIdentityProvider
#openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider'}]
# host group for masters
[masters]
master.example.com
# host group for etcd
[etcd]
master.example.com
# host group for nodes, includes region info
[nodes]
master.example.com openshift_node_group_name='node-config-master'
node1.example.com openshift_node_group_name='node-config-compute'
node2.example.com openshift_node_group_name='node-config-compute'
infra-node1.example.com openshift_node_group_name='node-config-infra'
infra-node2.example.com openshift_node_group_name='node-config-infra'
Copy to ClipboardCopied!Toggle word wrapToggle overflow
중요
OpenShift Container Platform 3.9부터 기본 노드 선택기 요구 사항 및 노드 레이블 고려 사항을 이해하려면 노드 호스트 레이블 구성을 참조하십시오.
이 예제를 사용하려면 환경 및 사양과 일치하도록 파일을 수정하고 /etc/ansible/hosts 로 저장합니다.