私はOpenShift Originを使用しています。私は、1台のマスターと2台のノードを安全なオープンシフトを使ってインストールしました。 すべてが正常であるようです。私はhttp://10.1.10.1:8443でダッシュボードにアクセスできます。しかし、私はサービスを公開したいときにこの問題が発生します:OpenShiftでサービスを公開していません
- 私はDashboard経由でtomcatコンテナを配備しました。
- その後、Dashboard経由でもマスターを介してTomcatを公開するためのルートを作成しましたが、http://10.1.10.1:8080(マスターIP:公開されたポート)に行くと接続が拒否されます。
OSのバージョン
CentOS Linux release 7.3.1611 (Core)
OCバージョン
oc v1.4.1+3f9807a
kubernetes v1.4.0+776c994
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://10.1.10.1:8443
openshift v1.4.1+3f9807a
kubernetes v1.4.0+776c994
ansible /ホスト
# Create an OSEv3 group that contains the masters and nodes groups
[OSEv3:children]
masters
nodes
#etcd
# Set variables common for all OSEv3 hosts
[OSEv3:vars]
ansible_user=root
ansible_become=true
deployment_type=origin
openshift_release=1.4.1
containerized=true
openshift_router_selector='router=true'
openshift_registry_selector='registry=true'
enable_docker_excluder=false
enable_excluders=false
os_firewall_use_firewalld=false
# enable htpasswd auth
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
openshift_master_htpasswd_users={'admin': '$apr1$zgSjCrLt$1KSuj66CggeWSv.D.BXOA1', 'user': '$apr1$.gw8w9i1$ln9bfTRiD6OwuNTG5LvW50'}
# host group for masters
[masters]
10.1.10.1 openshift_public_hostname=10.1.10.1 openshift_hostname=os-master
# host group for etcd, should run on a node that is not schedulable
#[etcd]
#54.175.0.44
# host group for worker nodes, we list master node here so that
# openshift-sdn gets installed. We mark the master node as not
# schedulable.
[nodes]
10.1.10.1openshift_hostname=10.1.10.1 openshift_schedulable=false
10.1.10.2openshift_hostname=10.1.10.2openshift_node_labels="{'router':'true','registry':'true'}"
10.1.10.3 openshift_hostname=10.1.10.3 openshift_node_labels="{'router':'true','registry':'true'}"
OCのADM診断コマンドは、2の警告を示しています。
を3210WARN: [DH0005 from diagnostic [email protected]/origin/pkg/diagnostics/host/check_master_config.go:52]
Validation of master config file '/etc/origin/master/master-config.yaml' warned:
assetConfig.loggingPublicURL: Invalid value: "": required to view aggregated container logs in the console
assetConfig.metricsPublicURL: Invalid value: "": required to view cluster metrics in the console
auditConfig.auditFilePath: Required value: audit can now be logged to a separate file
WARN: [DClu0003 from diagnostic [email protected]/origin/pkg/diagnostics/cluster/node_definitions.go:112]
Node 10.1.10.1 is ready but is marked Unschedulable.
This is usually set manually for administrative reasons.
An administrator can mark the node schedulable with:
oadm manage-node 10.1.10.1 --schedulable=true
While in this state, pods should not be scheduled to deploy on the node.
Existing pods will continue to run until completed or evacuated (see
other options for 'oadm manage-node').
これにいくつかの光を当ててください。 ありがとうございます。
Webコンソールは公開するサービスにアクセスするために使用することがあなたに正しいURLが表示されるはずです。 OpenShiftが生成する完全なホスト名を使用する必要があります.IPアドレスを使用することはできません。それ以外の場合、ルータは要求をどのようにルーティングするかわかりません。公開経路は、アプリケーションが内部で使用しているポートではなく、ポート80/443(HTTP/HTTPS)を使用します。 '' oc get routes''を使って公開しているアプリケーションの外部ホスト名を見ることもできます。 –
こんにちはグラハム、 あなたのメッセージをありがとう。 Look in my ocルートを取得する tomcat-test-route 10.1.10.1 tomcat-test-deploy 8080-tcp – devops85
IPアドレスではない完全修飾ドメイン名が表示されます。あなたが示すものは正しく見えません。あなたが間違ってクラスタを設定したように見えるか、ルートを作成するときにホスト名のIPアドレスを与えたように見えます。おそらくhttps://openshift.katacoda.com/でオンライントレーニングの例を試して、何を期待するかを知っているでしょう。それらにはルートの作成が含まれます。画像からアプリケーションを導入するコースのシナリオから始めてください。 –