繁体   English   中英

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

[英]multi master OKD-3.11 setup fails if master-1 nodes is down

我正在尝试根据官方文档中的清单文件在 openstack VM 中安装多主 openshift-3.11 设置。

https://docs.openshift.com/container-platform/3.11/install/example_inventories.html#multi-masters-single-etcd-using-native-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
重现步骤

根据此处提到的清单文件https://docs.openshift.com/container-platform/3.11/install/example_inventories.html#multi-masters-single-etcd-using- 启动 okd -3.11 多主设置土生土长的哈

当前结果

设置成功,但遇到了两个问题,如下所述,

  1. 在发出“oc get nodes”命令时无法列出负载均衡器节点。
 [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 关闭,则主节点或负载均衡器的 rest 无法运行任何 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 设置可以正常工作。

预期结果

尽管任何一个主节点出现故障,OKD 设置应该已启动并运行。

库存文件:

 [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 的整个设置依赖性以及解决此问题的任何解决方法。

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

事先你应该配置你的负载均衡到你的主节点,并将 LB IP(AKA VIP)注册到 DNS 作为ocp-cluster.example.com 此主机名将成为 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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM