如果master-1节点关闭,则multi-master OKD-3.11设置失败



我正试图根据官方文档中的清单文件在openstack虚拟机中安装多主机openshift-3.11安装程序。

https://docs.openshift.com/container-platform/3.11/install/example_inventories.html#multi-使用原生ha 的主单蚀刻

OKD版本
[centos@master1 ~]$ oc version
oc v3.11.0+62803d0-1
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://master1.167.254.204.74.nip.io:8443
openshift v3.11.0+ff2bdbd-531
kubernetes v1.11.0+d4cacc0
复制步骤

根据这里提到的库存文件,调出okd-3.11多主机设置,https://docs.openshift.com/container-platform/3.11/install/example_inventories.html#multi-使用原生ha 的主单蚀刻

当前结果

设置是成功的,但遇到了以下两个问题,

  1. 无法在";oc获取节点";命令
[centos@master1 ~]$ oc get nodes
NAME                            STATUS    ROLES          AGE       VERSION
master1.167.254.204.74.nip.io   Ready     infra,master   6h        v1.11.0+d4cacc0
master2.167.254.204.58.nip.io   Ready     infra,master   6h        v1.11.0+d4cacc0
master3.167.254.204.59.nip.io   Ready     infra,master   6h        v1.11.0+d4cacc0
node1.167.254.204.82.nip.io     Ready     compute        6h        v1.11.0+d4cacc0
  1. 主节点和负载平衡器完全依赖于主-1节点,因为如果主-1关闭,则其余主节点或负载平衡器无法运行任何oc命令
[centos@master2 ~]$ oc get nodes
Unable to connect to the server: dial tcp 167.254.204.74:8443: connect: no route to host

如果其他主节点(主节点-1以外(或负载平衡器出现故障,则OKD设置工作正常。

预期结果

OKD设置应该是up&尽管任何一个主节点出现故障,但仍在运行。

库存文件:

[OSEv3:children]
masters
nodes
etcd
lb
[masters]
master1.167.254.204.74.nip.io
master2.167.254.204.58.nip.io
master3.167.254.204.59.nip.io
[etcd]
master1.167.254.204.74.nip.io
master2.167.254.204.58.nip.io
master3.167.254.204.59.nip.io
[lb]
lb.167.254.204.111.nip.io
[nodes]
master1.167.254.204.74.nip.io openshift_ip=167.254.204.74 openshift_schedulable=true openshift_node_group_name='node-config-master'
master2.167.254.204.58.nip.io openshift_ip=167.254.204.58 openshift_schedulable=true openshift_node_group_name='node-config-master'
master3.167.254.204.59.nip.io openshift_ip=167.254.204.59 openshift_schedulable=true openshift_node_group_name='node-config-master'
node1.167.254.204.82.nip.io openshift_ip=167.254.204.82 openshift_schedulable=true openshift_node_group_name='node-config-compute'
[OSEv3:vars]
debug_level=4
ansible_ssh_user=centos
ansible_become=true
ansible_ssh_common_args='-o StrictHostKeyChecking=no'
openshift_enable_service_catalog=true
ansible_service_broker_install=true
openshift_node_groups=[{'name': 'node-config-master', 'labels': ['node-role.kubernetes.io/master=true', 'node-role.kubernetes.io/infra=true']}, {'name': 'node-config-compute', 'labels': ['node-role.kubernetes.io/compute=true']}]
containerized=false
os_sdn_network_plugin_name='redhat/openshift-ovs-multitenant'
openshift_disable_check=disk_availability,docker_storage,memory_availability,docker_image_availability
deployment_type=origin
openshift_deployment_type=origin
openshift_release=v3.11.0
openshift_pkg_version=-3.11.0
openshift_image_tag=v3.11.0
openshift_service_catalog_image_version=v3.11.0
template_service_broker_image_version=v3.11
osm_use_cockpit=true
# put the router on dedicated infra1 node
openshift_master_cluster_method=native
openshift_master_default_subdomain=sub.master1.167.254.204.74.nip.io
openshift_public_hostname=master1.167.254.204.74.nip.io
openshift_master_cluster_hostname=master1.167.254.204.74.nip.io

请让我知道主节点-1的整个设置依赖关系,以及解决此问题的任何方法。

您应该将LB主机名配置为openshift_master_cluster_hostnameopenshift_master_cluster_public_hostname,而不是主主机名。作为您的配置,如果您将其配置为master1,那么所有API入口点将是master1。因此,如果master1停止,那么所有API服务都将关闭。

您应该提前将LB配置为向主节点进行负载平衡,并将LB IP(AKA VIP(注册为ocp-cluster.example.com到DNS。此主机名将是OCP API的入口点,您可以使用openshift_master_cluster_hostnameopenshift_master_cluster_public_hostname进行设置。

openshift_master_cluster_method=native
openshift_master_cluster_hostname=ocp-cluster.example.com
openshift_master_cluster_public_hostname=ocp-cluster.example.com

最新更新