A.3. 環境の設定


本章では、Red Hat Openshift Container Platform の環境設定に関する詳細について説明します。

A.3.1. Red Hat OpenShift Container Platform クラスターの準備

以下の手順を実行して、Red Hat OpenShift Container Platform クラスターを準備します。

  1. マスターまたはクライアントで、以下のコマンドを実行し、クラスター管理者としてログインします。

    # oc login

    以下は例になります。

    # oc login
    Authentication required for https://dhcp46-24.lab.eng.blr.redhat.com:8443 (openshift)
    Username: test
    Password:
    Login successful.
    
    You have access to the following projects and can switch between them with 'oc project <project_name>':
    
      * default
        kube-system
        logging
        management-infra
        openshift
        openshift-infra
    
    
    Using project "default".
  2. マスターまたはクライアントで以下のコマンドを実行し、コンテナー化されたすべての Red Hat Gluster Storage サービスが含まれるプロジェクトを作成します。

    # oc new-project <project_name>

    以下は例になります。

    # oc new-project storage-project
    
    Now using project "storage-project" on server "https://master.example.com:8443"
  3. プロジェクトが作成されたら、マスターノードで以下のコマンドを実行し、Red Hat Gluster Storage コンテナーが特権モードでしか実行できないように、特権付きコンテナーのデプロイメントができるようにします。

    # oc  adm policy add-scc-to-user privileged -z default
  4. マスターで以下の手順を実行し、ルーターを設定します。

    注記

    ルーターがすでに存在する場合は、手順 5 に進みます。ルーターがすでにデプロイされているかどうかを確認するには、以下のコマンドを実行します。

    # oc get dc --all-namespaces

    すべての namespace のすべてのルーターを一覧表示するには、以下のコマンドを実行します。

    # oc get dc --all-namespaces --selector=router=router
    NAME                                  REVISION   DESIRED   CURRENT   TRIGGERED BY
    glusterblock-storage-provisioner-dc   1          1         0         config
    heketi-storage                        4          1         1         config
    1. 以下のコマンドを実行して、ルーターのデプロイメントを有効にします。

      # oc adm policy add-scc-to-user privileged -z router
    2. 以下のコマンドを実行して、ルーターをデプロイします。

      # oc adm router storage-project-router --replicas=1
    3. /etc/origin/master/master-config.yaml にある config.yaml ファイルのサブドメイン名を編集します。

      以下は例になります。

      subdomain: "cloudapps.mystorage.com"

      詳細は、https://access.redhat.com/documentation/ja-jp/openshift_container_platform/3.11/html-single/configuring_clusters/#customizing-the-default-routing-subdomain を参照してください。

    4. OpenShift Container Platform 3.7 および 3.9 の場合は、以下のコマンドを実行してサービスを再起動します。

      # systemctl restart atomic-openshift-master-api atomic-openshift-master-controllers
      注記

    ルーター設定の詳細は、https://access.redhat.com/documentation/ja-jp/openshift_container_platform/3.11/html/configuring_clusters/setting-up-a-router を参照してください。

  5. 以下のコマンドを実行して、ルーターが実行中かどうかを確認します。

    # oc get dc <_router_name_>

    以下は例になります。

    # oc get dc storage-project-router
    NAME                                  REVISION   DESIRED   CURRENT   TRIGGERED BY
    glusterblock-storage-provisioner-dc   1          1         0         config
    heketi-storage                        4          1         1         config
注記

ルーターが起動するまで、*/etc/dnsmasq.conf * ファイルを編集しないでください。

  1. ルーターの実行後に、OpenShift クラスターのサービスにアクセスするように、クライアントを設定する必要があります。クライアントで以下の手順を実行し、DNS を設定します。

    1. 以下のコマンドを実行して、ルーターの IP アドレスを検索します。

      # oc get pods -o wide --all-namespaces | grep router
      storage-project storage-project-router-1-cm874        1/1       Running   119d       10.70.43.132   dhcp43-132.lab.eng.blr.redhat.com
    2. /etc/dnsmasq.conf ファイルを編集し、以下の行をファイルに追加します。

      address=/.cloudapps.mystorage.com/<Router_IP_Address>

      Router_IP_Address は、ルーターが実行されているノードの IP アドレスです。

    3. 以下のコマンドを実行して dnsmasq サービスを再起動します。

      # systemctl restart dnsmasq
    4. /etc/resolv.conf を編集し、以下の行を追加します。

      nameserver 127.0.0.1

DNS の設定に関する詳細は、https://access.redhat.com/documentation/ja-jp/openshift_container_platform/3.11/html/installing_clusters/install-config-install-prerequisites#prereq-dns を参照してください。

Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る