如果master-1节点关闭,则多主站OKD-3.11设置将失败 [英] multi master OKD-3.11 setup fails if master-1 nodes is down

查看:111
本文介绍了如果master-1节点关闭,则多主站OKD-3.11设置将失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试根据官方文档中的清单文件在openstack VM中安装多主机openshift-3.11安装程序.

I am trying to install multi-master openshift-3.11 setup in openstack VMs as per the inventory file present in the official documentation.

https://docs.openshift.com/container-platform/3.11/install/example_inventories.html#multi-masters-single-etcd-using-native-ha

[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-masters-single-etcd-using-native-ha

Steps To Reproduce

Bring up an okd-3.11 multi master setup as per the inventory file mentioned in here, https://docs.openshift.com/container-platform/3.11/install/example_inventories.html#multi-masters-single-etcd-using-native-ha

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

The setup is successful but struck with two issues as mentioned below,

    在发出"oc get nodes"消息时,无法列出负载均衡器节点命令.
  1. unable to list down the load balancer nodes on issue of "oc get nodes" command.

[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. 主节点和负载均衡器完全依赖于master-1节点,因为如果master-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

如果其他主节点(除master-1以外)或负载均衡器出现故障,则OKD设置可以正常工作.

The OKD setup works fine if the other master nodes (other than master-1) or the load balancer are down.

OKD设置应已启动&尽管任何一个主节点都发生故障,但仍在运行.

The OKD setup should be up & running though any one of the master nodes went down.

库存文件:

[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

请告知我对master-node-1的整个设置依赖关系,以及解决此问题的任何解决方法.

Please let me know the entire setup dependency on master-node-1 and also any work around to fix this.

推荐答案

您应将LB主机名配置为openshift_master_cluster_hostnameopenshift_master_cluster_public_hostname,而不是主主机名. 作为配置,如果将其配置为master1,则所有API入口点均为master1,因此,如果master1停止,则所有API服务均将关闭.

You should configure LB hostname to openshift_master_cluster_hostname and openshift_master_cluster_public_hostname, not master hostname. As your configuration, if you configure it as master1, then all API entrypoint will be master1, so if master1 stopped, then all API service would be down.

事先,您应该配置LB以平衡到主节点,并以ocp-cluster.example.com的形式将LB IP(AKA VIP)注册到DNS. 该主机名将成为OCP API的入口点,您可以同时使用openshift_master_cluster_hostnameopenshift_master_cluster_public_hostname进行设置.

In advance you should configure your LB for loadbalancing to your master nodes, and register the LB IP(AKA VIP) to DNS as ocp-cluster.example.com. This hostname will be entrypoint for OCP API, you can set it using both openshift_master_cluster_hostname and openshift_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

这篇关于如果master-1节点关闭,则多主站OKD-3.11设置将失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆