2016-11-01 8 views
1

以下の構成により、オープンシフト原点で、プレイブックを使用して、安全な環境を構築しました。配備ルータステータス保留中

[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'}" 

次のコマンドでは、openshift、login、oh、それが完了しました。

[login command] 
oc login -u system:admin -n default 

ルータ内のレプリカは、以下のコマンドで作成されました。

[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 

このような状況ですが、どのように対応したら、ルータでレプリカを正しく作れますか?

+0

私は、ここでの問題は以下の通りであると思っています。あなたは 'oc get nodes'を実行することができます。ノード(あなたのマスタと同じマシン上にある)が予定外になると思います。つまり、スケジューラはそのノードにポッドを割り当てません。それは、lable: 'region: 'infra''というノードを持っています。レジストラ/ルータのポッドなどが 'infra'というラベルを持つノードに自動的に配備されるかどうかはわかりません。それが問題なのかもしれません。ラベルを持つノード上にポッドを作成する必要がありますが、ラベルの付いたノードは予定外です。それが役に立ったら教えてください。 – lvthillo

答えて

3

原点のクリーンインストール後に同じ問題が発生しました。 マスターをアンコーディングすることで問題は解決します。高度なインストール中

をlorenzvth7するためのthnxは、openshift_hosted_router_selectorとopenshift_registry_selector Ansibleの設定は、デフォルトでは地域=インフラに設定されています。デフォルトルータとレジストリは、region = infraラベルに一致するノードが存在する場合にのみ、自動的に展開されます。

また、エラートピックスタータのケースに応じて「PodFitsHostPorts

ルータは、直接ホスト上のすべてのインターフェイス上でポート80と443に付着します。 ルータをポート80/443が利用可能で、が別のサービスで使用されていないホストに制限し、ノードセレクタとスケジューラ設定を使用してこれを設定します。 例として、ルータなどのサービスを実行するためにインフラストラクチャノードを専用にすることでこれを実現できます。

これは、再ラベル付けすることを意味します。 openshift-node01.example.com as region:infra

関連する問題