Openshift 部署路由器状态挂起

Openshift 部署路由器状态挂起,openshift,openshift-origin,Openshift,Openshift Origin,通过以下组合,openshift origin,使用ansible中的playbook,构建了环境 [node] openshift-master.example.com<br> openshift-node01.example.com<br> openshift-node02.example.com<br> openshift-etcd.example.com<br> [/etc/ansible/hosts] [OSEv3:children]

通过以下组合,openshift origin,使用ansible中的playbook,构建了环境

[node]
openshift-master.example.com<br>
openshift-node01.example.com<br>
openshift-node02.example.com<br>
openshift-etcd.example.com<br>


[/etc/ansible/hosts]
[OSEv3:children]
masters
nodes
etcd

# Set variables common for all OSEv3 hosts
[OSEv3:vars]
ansible_ssh_user=root
deployment_type=origin

[masters]
openshift-master.example.com

[etcd]
openshift-etcd.example.com

# host group for nodes, includes region info
[nodes]
openshift-master.example.com openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
openshift-node01.example.com openshift_node_labels="{'region': 'primary', 'zone': 'east'}"
openshift-node02.example.com openshift_node_labels="{'region': 'primary', 'zone': 'west'}"
在路由器中复制,它是在下面的命令中制作的

 [create router command]
 oc scale dc/router --replicas=2
发生以下事件,并且某个位置无法在路由器中创建副本

 [create router command]
 Failed scheduling  
 pod (router-2-ievkl) failed to fit in any node fit failure on node (openshift-node01.example.com): CheckServiceAffinity fit failure on node (openshift-node02.example.com): CheckServiceAffinity fit failure on node (openshift-master.example.com): PodFitsHostPorts

就是这样的情况,但是当我怎么做的时候,我能在路由器上制作副本吗?

在原版的干净安装后也遇到了同样的问题。 非命令大师做这件事。Thnx到lorenzvth7

在高级安装过程中,默认情况下,openshift_托管的_路由器_选择器和openshift_注册表_选择器Ansible设置设置为region=infra。只有存在与region=infra标签匹配的节点时,才会自动部署默认路由器和注册表

此外,根据错误主题starter的案例“PodFitsHostPorts

路由器直接连接到主机上所有接口上的端口80和443将路由器限制在端口80/443可用且未被其他服务使用的主机上,并使用节点选择器和调度程序配置进行设置例如,您可以通过将基础结构节点专用于运行路由器等服务来实现这一点

因此,这意味着您应该将例如openshift-node01.example.com重新标记为region:infra

我认为(我不确定)这里的问题如下。您可以执行
ocget nodes
,我认为您的节点(与主节点在同一台机器上)将是不可调度的。这意味着调度程序不会将POD分配给该节点。它是带有as标签的节点:
区域:'infra'
。现在我不确定注册表/路由器吊舱等是否自动部署在标签为
infra
的节点上。如果是,那可能就是问题所在。它需要在带有infra标签的节点上创建吊舱,但带有infra标签的节点是不可调度的。如果有帮助,请告诉我。
 [create router command]
 Failed scheduling  
 pod (router-2-ievkl) failed to fit in any node fit failure on node (openshift-node01.example.com): CheckServiceAffinity fit failure on node (openshift-node02.example.com): CheckServiceAffinity fit failure on node (openshift-master.example.com): PodFitsHostPorts