5.3.2. Co-located Clustered etcd에서 Native HA를 사용하는 여러 마스터
5.3.2. Co-located Clustered etcd에서 Native HA를 사용하는 여러 마스터
다음에서는 기본 HA 방법(각 호스트에서 정적 Pod로 실행되는 etcd 포함), HAProxy 로드 밸런서 1개, 사용자 애플리케이션을 호스팅하는 데 필요한 노드 2개, 전용 인프라 호스팅을 위한 node-role.kubernetes.io/infra=true 라벨을 사용하는 마스터 3개 환경 예를 설명합니다.
Expand
호스트 이름
설치할 구성 요소/역할
master1.example.com
마스터( native HA를 사용한 클러스터) 및 etcd가 각 호스트에서 정적 포드로 실행되는 노드
master2.example.com
master3.example.com
lb.example.com
HAProxy에서 API 마스터 끝점만 로드 밸런싱
node1.example.com
컴퓨팅 노드
node2.example.com
infra-node1.example.com
전용 인프라 노드
infra-node2.example.com
[masters], [etcd], [lb], [nodes] 및 [nodes] 섹션에 있는 다음 예제 호스트가 다음 예제 인벤토리 파일의 섹션을 확인할 수 있습니다.
Create an OSEv3 group that contains the master, nodes, etcd, and lb groups.
The lb group lets Ansible configure HAProxy as the load balancing solution.
Comment lb out if your load balancer is pre-configured.
Set variables common for all OSEv3 hosts
uncomment the following to enable htpasswd authentication; defaults to DenyAllPasswordIdentityProvider
Native high availability cluster method with optional load balancer.
If no lb group is defined installer assumes that a load balancer has
been preconfigured. For installation the value of
openshift_master_cluster_hostname must resolve to the load balancer
or to one or all of the masters defined in the inventory if no load
balancer is present.
host group for masters
host group for etcd
Specify load balancer host
host group for nodes, includes region info
# Create an OSEv3 group that contains the master, nodes, etcd, and lb groups.
# The lb group lets Ansible configure HAProxy as the load balancing solution.
# Comment lb out if your load balancer is pre-configured.
[OSEv3:children]
masters
nodes
etcd
lb
# 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'}]
# Native high availability cluster method with optional load balancer.
# If no lb group is defined installer assumes that a load balancer has
# been preconfigured. For installation the value of
# openshift_master_cluster_hostname must resolve to the load balancer
# or to one or all of the masters defined in the inventory if no load
# balancer is present.
openshift_master_cluster_method=native
openshift_master_cluster_hostname=openshift-internal.example.com
openshift_master_cluster_public_hostname=openshift-cluster.example.com
# host group for masters
[masters]
master1.example.com
master2.example.com
master3.example.com
# host group for etcd
[etcd]
master1.example.com
master2.example.com
master3.example.com
# Specify load balancer host
[lb]
lb.example.com
# host group for nodes, includes region info
[nodes]
master[1:3].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 로 저장합니다.