5.2. 단일 마스터 예
단일 마스터 및 여러 노드와 단일 etcd 호스트로 환경을 구성할 수 있습니다.
설치 후 단일 마스터 클러스터에서 여러 마스터로 이동하는 것은 지원되지 않습니다.
5.2.1. 단일 마스터, 단일 etcd 및 여러 노드 링크 복사링크가 클립보드에 복사되었습니다!
다음 표에서는 단일 마스터 (동일한 호스트에서 정적 포드로 실행되는 단일 etcd 인스턴스 포함), 사용자 애플리케이션을 호스팅하는 데 사용되는 두 노드, 전용 인프라 호스팅을 위한 node-role.kubernetes.io/infra=true 라벨이 있는 두 개의 노드에 대해 설명합니다.
| 호스트 이름 | 설치할 구성 요소/역할 |
|---|---|
| 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
[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'
OpenShift Container Platform 3.9부터 기본 노드 선택기 요구 사항 및 노드 레이블 고려 사항을 이해하려면 노드 호스트 레이블 구성을 참조하십시오.
이 예제를 사용하려면 환경 및 사양과 일치하도록 파일을 수정하고 /etc/ansible/hosts 로 저장합니다.