Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

5.2.2. 단일 마스터, 여러 etcd 및 여러 노드

다음 표에서는 단일 마스터, 세 개의 etcd 호스트, 사용자 애플리케이션을 호스팅하는 두 개의 노드전용 인프라 호스팅을 위한 node-role.kubernetes.io/infra=true 라벨이 있는 두 개의 노드에 대해 설명합니다.

호스트 이름설치할 구성 요소/역할

master.example.com

마스터 및 노드

etcd1.example.com

etcd

etcd2.example.com

etcd3.example.com

node1.example.com

컴퓨팅 노드

node2.example.com

infra-node1.example.com

전용 인프라 노드

infra-node2.example.com

다음 예제 인벤토리 파일의 [masters], [nodes], [etcd] 섹션에 있는 예제 호스트를 볼 수 있습니다.

단일 마스터, 여러 etcd 및 여러 노드 인벤토리 파일

# 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]
ansible_ssh_user=root
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]
etcd1.example.com
etcd2.example.com
etcd3.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'

중요

OpenShift Container Platform 3.9부터 기본 노드 선택기 요구 사항 및 노드 레이블 고려 사항을 이해하려면 노드 호스트 레이블 구성을 참조하십시오.

이 예제를 사용하려면 환경 및 사양과 일치하도록 파일을 수정하고 /etc/ansible/hosts 로 저장합니다.