9
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

OpenShift v4.13をIBM Cloud VPCへIPIインストールしてみた

Last updated at Posted at 2023-05-29

1. はじめに

IBM CloudのOpenShift環境として、Red Hat OpenShift on IBM CloudというManaged Serviceが提供されているが、OpenShift v4.12からは正式にIBM Cloud VPC上にIPI方式で導入が可能になった。これにより、マスターノードまで含めて自分のVPC内部で稼働するため、例えば

  • master/worker nodeが自分のVPCのデバイス一覧で表示されるようになり、Bandwidth allocationやMetadataアクセスなどのVSI for VPC自身が持つ機能を直接カスタマイズできる。
  • master/worker nodeが自分のVPC内にデプロイされるため、 (Service Endpointなどを経由せずとも)master nodeにも直接アクセスできる。
  • ユーザー端末からコンソールにアクセスする時にIAM連携されないし、Service Endpoint(ポート番号3xxxx)に対するredirectなども発生しないので、全部443のみでアクセスできる。
  • インターネットにアクセスする際のGlobal IPアドレスは、Public GatewayのIPアドレスに絞れる。

などの利点もある。本稿では、執筆時点で最新のv4.13を利用して、IPIを試してみた。なお、

  • 勝手にVPCとかsubnetは作成されたくないので、事前にVPCもsubnetも作成しておく構成とする。
  • 今回はまずは稼働の確認をしたかったのでpublic clusterを利用した(CISのドメイン名はcisxxxxxxxx.comとする。実際のドメイン名を記事上に公開したくないのでサニタイズして表示している)

参考ドキュメント: Installing on IBM Cloud VPC

2. IBM Cloud環境の事前準備

  • VPCやsubnetは勝手に作成されたくないので、事前に作成しておく。
  • デプロイ先subnetはjp-tok-1, jp-tok-2, jp-tok-3にそれぞれ作成し、public gatewayにattachしておく。
  • VPCおよびsubnetのResource Group名は今回の環境では共にCommonである。(VPCとsubnetのResource Groupを別々に指定するパラメーターがなさそうなので、Resource Groupが同じでないとインストールに失敗すると思われる)
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud is vpcs|grep -e ID -e vpc-tok-syasuda1
ID                                          Name               Status      Classic access   Default network ACL                   Default security group                 Resource group
r022-85621b2c-a349-4ae6-87e3-767ddeac7298   vpc-tok-syasuda1   available   false            acl-tok-syasuda-default               sg-tok-syasuda-default                 Common


[root@new-syasuda-tok1-vpc1 ~]# ibmcloud is subnets | grep -e ID -e sub-10-7 -e sub-10-8 -e sub-10-9
ID                                          Name                               Status      Subnet CIDR       Addresses   ACL                                   Public Gateway                             VPC                Zone       Resource group
02e7-6e131498-ed24-4bd3-9399-24636a8e71b8   sub-10-7-0-0-24                    available   10.7.0.0/24       247/256     acl-tok-syasuda-default               pgw-tok1-syasuda                           vpc-tok-syasuda1   jp-tok-1   Common
02f7-304ec82e-f0b9-40fc-a1b5-f80b13f2d282   sub-10-8-0-0-24                    available   10.8.0.0/24       248/256     acl-tok-syasuda-default               pgw-tok2-syasuda                           vpc-tok-syasuda1   jp-tok-2   Common
02g7-a0cfc9d8-3caa-4cc2-9b22-b64667a4e034   sub-10-9-0-0-24                    available   10.9.0.0/24       246/256     acl-tok-syasuda-default               pgw-tok3-syasuda                           vpc-tok-syasuda1   jp-tok-3   Common
  • DNS
    • Cloud Internet Service (DNS Servicesも選択可能だが、今回はPublic Clusterを作成するためCISを利用)
  • IAM API Key
    • OpenShift導入・構成時に利用するIBM Cloud APIを呼び出す際のService IDを作成する際に必要となる。IBM CloudのAPI keyは以下に保管し、IC_API_KEY環境変数として読み込んでおく。。
./ibmcloud_apikey_1756623
(API Key)

結果として、以下を作成予定である。

  • ノード
    • bx2-4x16(4 vCPUs x 16 GB RAM) x 1 : bootstrap (IPIインストール時のみ利用。インストールが完了すると削除される)
    • bx2-4x16(4 vCPUs x 16 GB RAM) x 3 : Controller Nodes
    • bx2-4x16(4 vCPUs x 16 GB RAM) x 3 : Worker Nodes

3. インストーラー準備

  • OpenShift Cluster Manager Hybrid Cloud Consoleにログインし、Create clusterを押下。
    image.png
  • IBM Cloudを選択。image.png
  • 今回は、VPC内部の踏み台サーバーからインストールを実行する予定。image.png
    • インストーラーとしてLinuxを選択し踏み台サーバーに保管。
    • pull secretsは~/.pull-secretに保管。
    • Command line interface(ocコマンド)は、/usr/local/bin/ocに保管。
[root@new-syasuda-tok1-vpc1 ~]# tar -zxvf openshift-install-linux.tar.gz
[root@new-syasuda-tok1-vpc1 ~]# ./openshift-install version
./openshift-install 4.13.0
built from commit 44db7b2959d97ecc9b7b14785ce092640fc87941
release image quay.io/openshift-release-dev/ocp-release@sha256:74b23ed4bbb593195a721373ed6693687a9b444c97065ce8ac653ba464375711
release architecture amd64
~/.pull-secret
(Secret情報を保管)
[root@new-syasuda-tok1-vpc1 ~]# which oc
/usr/local/bin/oc

[root@new-syasuda-tok1-vpc1 ~]# oc version
Client Version: 4.13.0
Kustomize Version: v4.5.7
Kubernetes Version: v1.26.3+b404935

4. ccoctlコマンドツールの抽出

ccoctlコマンドツールの抽出
[root@new-syasuda-tok1-vpc1 ~]# RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')
[root@new-syasuda-tok1-vpc1 ~]# echo ${RELEASE_IMAGE}
quay.io/openshift-release-dev/ocp-release@sha256:74b23ed4bbb593195a721373ed6693687a9b444c97065ce8ac653ba464375711

[root@new-syasuda-tok1-vpc1 ~]# CCO_IMAGE=$(oc adm release info --image-for='cloud-credential-operator' $RELEASE_IMAGE -a ~/.pull-secret)
[root@new-syasuda-tok1-vpc1 ~]# echo ${CCO_IMAGE}
quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:bcb76631bf77fe40297b07cc5e8f27753535e756fe6222a66697559cabdbfea2

[root@new-syasuda-tok1-vpc1 ~]# oc image extract $CCO_IMAGE --file="/usr/bin/ccoctl" -a ~/.pull-secret
[root@new-syasuda-tok1-vpc1 ~]# chmod 775 ccoctl
[root@new-syasuda-tok1-vpc1 ~]# ./ccoctl --help
OpenShift credentials provisioning tool

Usage:
  ccoctl [command]

Available Commands:
  alibabacloud Manage credentials objects for alibaba cloud
  aws          Manage credentials objects for AWS cloud
  completion   Generate the autocompletion script for the specified shell
  gcp          Manage credentials objects for Google cloud
  help         Help about any command
  ibmcloud     Manage credentials objects for IBM Cloud
  nutanix      Manage credentials objects for Nutanix

Flags:
  -h, --help   help for ccoctl

Use "ccoctl [command] --help" for more information about a command.

5. インストールディレクトリと、Credential用ディレクトリの作成

インストールディレクトリと、Credential用ディレクトリの作成
[root@new-syasuda-tok1-vpc1 ~]# mkdir -p ocp4-ipi
[root@new-syasuda-tok1-vpc1 ~]# mkdir -p ocp4-ipi-credential

6. install-config.yamlファイルの作成

6-1. CLIからの初期ファイルの生成(オプション)

openshift-install create install-config --dir xxxを実行することで、CLI上での実行にも関わらず、ウィザード方式(カーソルで対象を選択)で、オプションを指定することができる。
ただし、ここで作成されるinstall-config.yamlはこのままで利用できるものではないし、どうせカスタマイズしないといけないため、2回目以降のインストール時は既存のyamlファイルをコピーして最初からカスタマイズした方が早いかもしれない。

環境変数を呼び込む
[root@new-syasuda-tok1-vpc1 ~]# export IC_API_KEY=$(cat ~/ibmcloud_apikey_1756623)
IBM Cloudを選択
[root@new-syasuda-tok1-vpc1 ~]# ./openshift-install create install-config --dir ocp4-ipi
? Platform  [Use arrows to move, type to filter, ? for more help]
  aws
  azure
  gcp
> ibmcloud
  nutanix
  openstack
  ovirt
リージョンを選択
[root@new-syasuda-tok1-vpc1 ~]# ./openshift-install create install-config --dir ocp4-ipi
? Platform ibmcloud
? Region  [Use arrows to move, type to filter, ? for more help]
  ca-tor (Canada (Toronto))
  eu-de (EU Germany (Frankfurt))
  eu-gb (United Kindom (London))
  jp-osa (Japan (Osaka))
> jp-tok (Japan (Tokyo))
  us-east (US East (Washington DC))
  us-south (US South (Dallas))
ドメインを選択
[root@new-syasuda-tok1-vpc1 ~]# ./openshift-install create install-config --dir ocp4-ipi
? Platform ibmcloud
? Region jp-tok
? Base Domain  [Use arrows to move, type to filter, ? for more help]
  xxxx.com (CIS-Enterprise-Usage1)
> cisxxxxxxxx.com (CIS-Enterprise-Usage1)
  yyyy.com (CIS-Enterprise-Usage1)
クラスター名を選択
[root@new-syasuda-tok1-vpc1 ~]# ./openshift-install create install-config --dir ocp4-ipi
? Platform ibmcloud
? Region jp-tok
? Base Domain cisxxxxxxxx.com (CIS-Enterprise-Usage1)
? Cluster Name [? for help] syasuda-ocp-ipi
~/.pull-secretに保管しているPull Secretの情報を貼り付け
[root@new-syasuda-tok1-vpc1 ~]# ./openshift-install create install-config --dir ocp4-ipi
? Platform ibmcloud
? Region jp-tok
? Base Domain cisxxxxxxxx.com (CIS-Enterprise-Usage1)
? Cluster Name syasuda-ocp-ipi
? Pull Secret [? for help] **********************************************************************************************************************************************
INFO Install-Config created in: ocp4-ipi
install-config.yamlの確認とバックアップ
[root@new-syasuda-tok1-vpc1 ~]# cd ocp4-ipi
[root@new-syasuda-tok1-vpc1 ocp4-ipi]# ls -l
total 4
-rw-r-----. 1 root root 3371 May 22 16:20 install-config.yaml
[root@new-syasuda-tok1-vpc1 ocp4-ipi]# cp -p install-config.yaml install-config.yaml_bak

6-2 install-config.yamlの編集

以下に注意点を挙げる。

  • networkResourceGroupNameは既存VPCおよび既存subnetのResource Groupを指定する。逆にいうと、VPCとsubnetは同じresource groupである必要がある(特定のsubnetのみ別のresource groupになっている構成はNG)
  • resourceGroupNameは今回IPIで作成するリソースを作成する既存のResource Groupを指定する。
  • docsのtypeの指定場所は間違い。
    • platform.ibmcloud.typeではない。./openshift-install explain installconfig.platform.ibmcloudの結果より、ここではないことがわかる。platform.ibmcloud.defaultMachinePlatform.typeが正確な場所。
    • compute.platform.ibmcloud.typeとかcontrolPlane.platform.ibmcloud.typeとかでも良い。

今回利用したyamlファイルは以下の通り。 次項のマニフェストファイル生成によってinstall-config.yamlは削除されてしまうので、必ずバックアップを事前に取得しておくこと!

install-config.yaml
additionalTrustBundlePolicy: Proxyonly
apiVersion: v1
baseDomain: cisxxxxxxxx.com
compute:
- architecture: amd64
  hyperthreading: Enabled
  name: worker
  platform:
    ibmcloud:
      type: bx2-4x16
  replicas: 3
controlPlane:
  architecture: amd64
  hyperthreading: Enabled
  name: master
  platform:
    ibmcloud:
      type: bx2-4x16
  replicas: 3
metadata:
  creationTimestamp: null
  name: syasuda-ocp-ipi
networking:
  clusterNetwork:
  - cidr: 172.20.0.0/14
    hostPrefix: 23
  machineNetwork:
  - cidr: 10.7.0.0/24
  - cidr: 10.8.0.0/24
  - cidr: 10.9.0.0/24
  networkType: OVNKubernetes
  serviceNetwork:
  - 172.30.0.0/16
platform:
  ibmcloud:
    region: jp-tok
    resourceGroupName: Default
    networkResourceGroupName: Common
    vpcName: vpc-tok-syasuda1
    controlPlaneSubnets:
      - sub-10-7-0-0-24
      - sub-10-8-0-0-24
      - sub-10-9-0-0-24
    computeSubnets:
      - sub-10-7-0-0-24
      - sub-10-8-0-0-24
      - sub-10-9-0-0-24
credentialsMode: Manual
publish: External
pullSecret: '{"auths": ...}'
fips: false
sshKey: xxxxx
install-config.yamlのバックアップ
[root@new-syasuda-tok1-vpc1 ocp4-ipi]# cp -p install-config.yaml install-config.yaml_bak4

7. マニフェストファイルの作成

前項でも記載したが、マニフェストファイル生成コマンドの実行によってinstall-config.yamlは削除されてしまうので、必ずバックアップを事前に取得しておくこと!

[root@new-syasuda-tok1-vpc1 ~]# export IC_API_KEY=$(cat ~/ibmcloud_apikey_1756623)
[root@new-syasuda-tok1-vpc1 ~]# ./openshift-install create manifests --dir ocp4-ipi
INFO Consuming Install Config from target directory
INFO Manifests created in: ocp4-ipi/manifests and ocp4-ipi/openshift
install-config.yamlが削除されて、代わりにマニフェストファイルが作成された。
[root@new-syasuda-tok1-vpc1 ~]# ls -ltra ocp4-ipi
total 744
-rw-r-----.  1 root root   3371 May 22 16:20 install-config.yaml_bak
-rw-r-----.  1 root root   4195 May 23 16:42 install-config.yaml_bak2
-rw-r-----.  1 root root   4227 May 24 19:19 install-config.yaml_bak3
drwx------. 42 root root   4096 May 25 20:54 ..
-rw-r-----.  1 root root   4263 May 25 22:41 install-config.yaml_bak4
drwxr-xr-x.  4 root root   4096 May 25 22:43 .
drwxr-x---.  2 root root   4096 May 25 22:43 manifests
drwxr-x---.  2 root root   4096 May 25 22:43 openshift
-rw-r-----.  1 root root 142605 May 25 22:43 .openshift_install_state.json
-rw-r--r--.  1 root root 561425 May 25 22:43 .openshift_install.log

8. Credentialファイルの作成と適用

[root@new-syasuda-tok1-vpc1 ~]# RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')
[root@new-syasuda-tok1-vpc1 ~]# echo ${RELEASE_IMAGE}
quay.io/openshift-release-dev/ocp-release@sha256:74b23ed4bbb593195a721373ed6693687a9b444c97065ce8ac653ba464375711

[root@new-syasuda-tok1-vpc1 ~]# oc adm release extract --cloud=ibmcloud --credentials-requests $RELEASE_IMAGE --to=./ocp4-ipi-credential/
Warning: the default reading order of registry auth file will be changed from "${HOME}/.docker/config.json" to podman registry config locations in the future version of oc. "${HOME}/.docker/config.json" is deprecated, but can still be used for storing credentials as a fallback. See https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md for the order of podman registry config locations.
Extracted release payload created at 2023-05-16T10:09:04Z

[root@new-syasuda-tok1-vpc1 ~]# ls -ltr ocp4-ipi-credential/
total 20
-rw-r--r--. 1 root root  945 May 25 22:44 0000_26_cloud-controller-manager-operator_15_credentialsrequest-ibm.yaml
-rw-r--r--. 1 root root 1179 May 25 22:44 0000_50_cluster-image-registry-operator_01-registry-credentials-request-ibmcos.yaml
-rw-r--r--. 1 root root  870 May 25 22:44 0000_50_cluster-ingress-operator_00-ingress-credentials-request.yaml
-rw-r--r--. 1 root root  869 May 25 22:44 0000_50_cluster-storage-operator_03_credentials_request_ibm.yaml
-rw-r--r--. 1 root root  860 May 25 22:44 0000_30_machine-api-operator_00_credentials-request.yaml
[root@new-syasuda-tok1-vpc1 ~]# export IC_API_KEY=$(cat ~/ibmcloud_apikey_1756623)
[root@new-syasuda-tok1-vpc1 ~]# ./ccoctl ibmcloud create-service-id --credentials-requests-dir ./ocp4-ipi-credential/ --name syasuda-ocp-ipi --output-dir ./ocp4-ipi/
(途中省略)
2023/05/25 22:55:45 Saved credentials configuration to: ocp4-ipi/manifests/openshift-cloud-controller-manager-ibm-cloud-credentials-credentials.yaml
2023/05/25 22:55:45 Saved credentials configuration to: ocp4-ipi/manifests/openshift-machine-api-ibmcloud-credentials-credentials.yaml
2023/05/25 22:55:45 Saved credentials configuration to: ocp4-ipi/manifests/openshift-image-registry-installer-cloud-credentials-credentials.yaml
2023/05/25 22:55:45 Saved credentials configuration to: ocp4-ipi/manifests/openshift-ingress-operator-cloud-credentials-credentials.yaml
2023/05/25 22:55:45 Saved credentials configuration to: ocp4-ipi/manifests/openshift-cluster-csi-drivers-ibm-cloud-credentials-credentials.yaml

これにより、以下のService IDが作成された。

  • syasuda-ocp-ipi-openshift-cloud-controller-manager-ibm-cloud-credentials
  • syasuda-ocp-ipi-openshift-machine-api-ibmcloud-credentials
  • syasuda-ocp-ipi-openshift-image-registry-installer-cloud-credentials
  • syasuda-ocp-ipi-openshift-ingress-operator-cloud-credentials
  • syasuda-ocp-ipi-openshift-cluster-csi-drivers-ibm-cloud-credentials
Service IDの一覧
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud iam service-ids|grep 2023-05-25
ServiceId-46a06cf1-36af-4d54-ba40-a6be89a1a274   syasuda-ocp-ipi-openshift-cloud-controller-manager-ibm-cloud-credentials                                                              2023-05-25T13:56+0000   2023-05-25T13:56+0000                                                                                                                                                                                                                     false
ServiceId-67277f0b-f4a4-4641-b6b9-c4ebe6cab2e5   syasuda-ocp-ipi-openshift-cluster-csi-drivers-ibm-cloud-credentials                                                                   2023-05-25T13:56+0000   2023-05-25T13:56+0000                                                                                                                                                                                                                     false
ServiceId-bd82f410-f65b-479a-9872-de0228c4fb69   syasuda-ocp-ipi-openshift-image-registry-installer-cloud-credentials                                                                  2023-05-25T13:56+0000   2023-05-25T13:56+0000                                                                                                                                                                                                                     false
ServiceId-029cca37-50a9-4a91-ad10-33f2074fd691   syasuda-ocp-ipi-openshift-ingress-operator-cloud-credentials                                                                          2023-05-25T13:56+0000   2023-05-25T13:56+0000                                                                                                                                                                                                                     false
ServiceId-2d61c8dc-6ad6-40f3-b576-59fc1679ad5e   syasuda-ocp-ipi-openshift-machine-api-ibmcloud-credentials                                                                            2023-05-25T13:56+0000   2023-05-25T13:56+0000                                                                                                                                                                                                                     false
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud iam service-policies syasuda-ocp-ipi-openshift-cloud-controller-manager-ibm-cloud-credentials
Getting all policies of service ID syasuda-ocp-ipi-openshift-cloud-controller-manager-ibm-cloud-credentials under 039dbe6794084c7cb514a276dd2345da as shiyasu@jp.ibm.com...
OK

Policy ID:   4759a27e-6ebe-432b-bec8-3aa3a69bc460
Roles:       Editor, Operator, Viewer
Resources:
             Service Name   is




Policy ID:   c0a62824-d5f4-486b-88b7-d333e8c4b27d
Roles:       Viewer
Resources:
             Resource Group   All resource groups
             Memo             Policy applies to the resource group
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud iam service-policies syasuda-ocp-ipi-openshift-cluster-csi-drivers-ibm-cloud-credentials
Getting all policies of service ID syasuda-ocp-ipi-openshift-cluster-csi-drivers-ibm-cloud-credentials under 039dbe6794084c7cb514a276dd2345da as shiyasu@jp.ibm.com...
OK

Policy ID:   3e440b3b-76c4-4985-8d30-a3b91f5ef2ee
Roles:       Viewer
Resources:
             Resource Group   All resource groups
             Memo             Policy applies to the resource group




Policy ID:   c4bade46-7a18-42b9-9220-8f7b22132e5e
Roles:       Operator, Editor, Viewer
Resources:
             Service Name   is
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud iam service-policies syasuda-ocp-ipi-openshift-image-registry-installer-cloud-credentials
Getting all policies of service ID syasuda-ocp-ipi-openshift-image-registry-installer-cloud-credentials under 039dbe6794084c7cb514a276dd2345da as shiyasu@jp.ibm.com...
OK

Policy ID:   043347fb-58c7-4cd8-9441-b841008c6361
Roles:       Viewer, Operator, Editor, Administrator, Reader, Writer
Resources:
             Service Name   cloud-object-storage




Policy ID:   6c5fa5c4-5b1d-4d98-8838-f0ed22929a1b
Roles:       Viewer
Resources:
             Resource Group   All resource groups
             Memo             Policy applies to the resource group
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud iam service-policies syasuda-ocp-ipi-openshift-ingress-operator-cloud-credentials
Getting all policies of service ID syasuda-ocp-ipi-openshift-ingress-operator-cloud-credentials under 039dbe6794084c7cb514a276dd2345da as shiyasu@jp.ibm.com...
OK

Policy ID:   d9898350-bccf-444c-ab92-a59ed8c2a3a2
Roles:       Manager, Reader, Writer
Resources:
             Service Name   internet-svcs




Policy ID:   fb1e2ed5-f1e7-4088-af21-e02eb8f78c95
Roles:       Manager, Reader, Writer
Resources:
             Service Name   dns-svcs
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud iam service-policies syasuda-ocp-ipi-openshift-machine-api-ibmcloud-credentials
Getting all policies of service ID syasuda-ocp-ipi-openshift-machine-api-ibmcloud-credentials under 039dbe6794084c7cb514a276dd2345da as shiyasu@jp.ibm.com...
OK

Policy ID:   59f9987e-6a12-468a-a88a-e70327111aeb
Roles:       Operator, Editor, Viewer
Resources:
             Service Name   is




Policy ID:   6489b745-a587-4bb0-a17b-5cfff861b119
Roles:       Viewer
Resources:
             Resource Group   All resource groups
             Memo             Policy applies to the resource group

9. インストールの開始

log level=debugだと大量にログが出力される(今回は大量にログが出力されて見辛かった・・・)。場合によっては、log-level=infoでインストールすると良い。

log level=INFOの行のみを抽出
[root@new-syasuda-tok1-vpc1 ~]# ./openshift-install create cluster --dir=./ocp4-ipi --log-level=debug

INFO Consuming Common Manifests from target directory
INFO Consuming Master Machines from target directory
INFO Consuming Worker Machines from target directory
INFO Consuming Openshift Manifests from target directory
INFO Consuming OpenShift Install (Manifests) from target directory
INFO Obtaining RHCOS image file from 'https://rhcos.mirror.openshift.com/art/storage/prod/streams/4.13-9.2/builds/413.92.202305021736-0/x86_64/rhcos-413.92.202305021736-0-ibmcloud.x86_64.qcow2.gz?sha256=222abce547c1bbf32723676f4977a3721c8a3788f0b7b6b3496b79999e8c60b3'
INFO The file was found in cache: /root/.cache/openshift-installer/image_cache/rhcos-413.92.202305021736-0-ibmcloud.x86_64.qcow2. Reusing...
INFO Creating infrastructure resources...
INFO Waiting up to 20m0s (until 11:51PM) for the Kubernetes API at https://api.syasuda-ocp-ipi.cisxxxxxxxx.com:6443...
INFO API v1.26.3+b404935 up
INFO Waiting up to 30m0s (until 12:01AM) for bootstrapping to complete...
INFO Destroying the bootstrap resources...
INFO Waiting up to 40m0s (until 12:21AM) for the cluster at https://api.syasuda-ocp-ipi.cisxxxxxxxx.com:6443 to initialize...
INFO Checking to see if there is a route at openshift-console/console...
INFO Install complete!
INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/root/ocp4-ipi/auth/kubeconfig'
INFO Access the OpenShift web-console here: https://console-openshift-console.apps.syasuda-ocp-ipi.cisxxxxxxxx.com
INFO Login to the console with user: "kubeadmin", and password: "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"
INFO Time elapsed: 49m31s

10. インストール後のログイン確認

10-1. OpenShift Cluster Manager Hybrid Cloud Console

OpenShift Cluster Manager Hybrid Cloud Consoleにログインした際の情報
image.png

10-2. OpenShiftコンソール

image.png
image.png

10-3. CLIでのログイン

[root@new-syasuda-tok1-vpc1 ~]# export KUBECONFIG=/root/ocp4-ipi/auth/kubeconfig
[root@new-syasuda-tok1-vpc1 ~]# oc login -u kubeadmin
[root@new-syasuda-tok1-vpc1 ~]# oc get nodes -o wide
NAME                                   STATUS   ROLES                  AGE     VERSION           INTERNAL-IP   EXTERNAL-IP   OS-IMAGE                                                       KERNEL-VERSION                 CONTAINER-RUNTIME
syasuda-ocp-ipi-x24rk-master-0         Ready    control-plane,master   3d17h   v1.26.3+b404935   10.7.0.11     10.7.0.11     Red Hat Enterprise Linux CoreOS 413.92.202305041429-0 (Plow)   5.14.0-284.13.1.el9_2.x86_64   cri-o://1.26.3-3.rhaos4.13.git641290e.el9
syasuda-ocp-ipi-x24rk-master-1         Ready    control-plane,master   3d17h   v1.26.3+b404935   10.8.0.6      10.8.0.6      Red Hat Enterprise Linux CoreOS 413.92.202305041429-0 (Plow)   5.14.0-284.13.1.el9_2.x86_64   cri-o://1.26.3-3.rhaos4.13.git641290e.el9
syasuda-ocp-ipi-x24rk-master-2         Ready    control-plane,master   3d17h   v1.26.3+b404935   10.9.0.10     10.9.0.10     Red Hat Enterprise Linux CoreOS 413.92.202305041429-0 (Plow)   5.14.0-284.13.1.el9_2.x86_64   cri-o://1.26.3-3.rhaos4.13.git641290e.el9
syasuda-ocp-ipi-x24rk-worker-1-vtnj4   Ready    worker                 3d16h   v1.26.3+b404935   10.7.0.12     10.7.0.12     Red Hat Enterprise Linux CoreOS 413.92.202305041429-0 (Plow)   5.14.0-284.13.1.el9_2.x86_64   cri-o://1.26.3-3.rhaos4.13.git641290e.el9
syasuda-ocp-ipi-x24rk-worker-2-n9b4w   Ready    worker                 3d16h   v1.26.3+b404935   10.8.0.8      10.8.0.8      Red Hat Enterprise Linux CoreOS 413.92.202305041429-0 (Plow)   5.14.0-284.13.1.el9_2.x86_64   cri-o://1.26.3-3.rhaos4.13.git641290e.el9
syasuda-ocp-ipi-x24rk-worker-3-6rkfh   Ready    worker                 3d16h   v1.26.3+b404935   10.9.0.12     10.9.0.12     Red Hat Enterprise Linux CoreOS 413.92.202305041429-0 (Plow)   5.14.0-284.13.1.el9_2.x86_64   cri-o://1.26.3-3.rhaos4.13.git641290e.el9

11. 作成されたIBM Cloud上のリソース確認

VSI
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud is instances |grep -e ID -e syasuda-ocp-ipi
ID                                          Name                                   Status    Reserved IP    Floating IP       Profile    Image                                             VPC                Zone       Resource group
02e7_bc124b0b-ff70-478b-8f45-f4af1c1c3837   syasuda-ocp-ipi-x24rk-master-0         running   10.7.0.11      -                 bx2-4x16   syasuda-ocp-ipi-x24rk-rhcos                       vpc-tok-syasuda1   jp-tok-1   Default
02e7_fb8a58e7-db79-4970-9752-c5fc679f81a9   syasuda-ocp-ipi-x24rk-worker-1-vtnj4   running   10.7.0.12      -                 bx2-4x16   syasuda-ocp-ipi-x24rk-rhcos                       vpc-tok-syasuda1   jp-tok-1   Default
02f7_4629f5f5-4dd4-49da-a199-94aa425ea1d2   syasuda-ocp-ipi-x24rk-master-1         running   10.8.0.6       -                 bx2-4x16   syasuda-ocp-ipi-x24rk-rhcos                       vpc-tok-syasuda1   jp-tok-2   Default
02f7_ffc9af50-746b-464b-9c84-96e7d70cd3f3   syasuda-ocp-ipi-x24rk-worker-2-n9b4w   running   10.8.0.8       -                 bx2-4x16   syasuda-ocp-ipi-x24rk-rhcos                       vpc-tok-syasuda1   jp-tok-2   Default
02g7_f5d38bf2-f1c2-4d6b-877c-59caa6ca0c65   syasuda-ocp-ipi-x24rk-master-2         running   10.9.0.10      -                 bx2-4x16   syasuda-ocp-ipi-x24rk-rhcos                       vpc-tok-syasuda1   jp-tok-3   Default
02g7_68525855-7ba3-4488-a803-54b720628e20   syasuda-ocp-ipi-x24rk-worker-3-6rkfh   running   10.9.0.12      -                 bx2-4x16   syasuda-ocp-ipi-x24rk-rhcos                       vpc-tok-syasuda1   jp-tok-3   Default
Load Balancer
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud is load-balancers | grep -e ID -e syasuda-ocp-ipi
ID                                          Name                                                          Family              Subnets                                             Is public   Provision status   Operating status   Resource group
r022-31b055e8-d794-4a49-ba17-883f98944c8a   syasuda-ocp-ipi-x24rk-kubernetes-api-public                   Application         sub-10-7-0-0-24, sub-10-8-0-0-24, sub-10-9-0-0-24   true        active             online             Default
r022-938d6d28-b7d0-4ace-a65a-0583d96f680a   syasuda-ocp-ipi-x24rk-kubernetes-api-private                  Application         sub-10-7-0-0-24, sub-10-8-0-0-24, sub-10-9-0-0-24   false       active             online             Default
r022-ebaaf85c-5fef-469f-90bf-931a32903dcc   kube-syasuda-ocp-ipi-x24rk-a29a9fd907d149d28e1438a99f08f652   Application         sub-10-7-0-0-24, sub-10-8-0-0-24, sub-10-9-0-0-24   true        active             online             Default
Security Group
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud is security-groups|grep -e ID -e syasuda-ocp-ipi
ID                                          Name                                             Rules   Targets   VPC                Resource group
r022-d581ae08-945f-4bea-94e6-f0ce2d8bc4ef   syasuda-ocp-ipi-x24rk-sg-cluster-wide            10      6         vpc-tok-syasuda1   Default
r022-c575115f-f86e-4266-96e7-b9accbd7d08c   syasuda-ocp-ipi-x24rk-sg-control-plane           3       3         vpc-tok-syasuda1   Default
r022-b1d1f946-66c3-409e-a4df-e767c1d486ba   syasuda-ocp-ipi-x24rk-sg-cp-internal             2       3         vpc-tok-syasuda1   Default
r022-4efadea3-024d-47b8-9691-40fbf118ab64   syasuda-ocp-ipi-x24rk-sg-kube-api-lb             4       2         vpc-tok-syasuda1   Default
r022-9c38b3eb-8a45-4ce0-aad1-ea53d93cdb7b   syasuda-ocp-ipi-x24rk-sg-openshift-net           17      6         vpc-tok-syasuda1   Default
その他リソース
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud resource service-instances | grep -e Location -e syasuda-ocp-ipi
Name                                                                                                      Location   State    Type               Resource Group ID
syasuda-ocp-ipi-x24rk-cos                                                                                 global     active   service_instance   d072b8a4c0a741ef999dd97caa434fc5
syasuda-ocp-ipi-x24rk-image-registry                                                                      global     active   service_instance   d072b8a4c0a741ef999dd97caa434fc5
CIS(DNS)
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud cis instance-set CIS-Enterprise-Usage1
[root@new-syasuda-tok1-vpc1 ~]# ibmcloud cis domains
Listing domains for service instance 'CIS-Enterprise-Usage1' ...
OK
ID                                 Name                   Status    Paused   Type
5f94c1214644097571c114f70bcda563   cisxxxxxxxx.com        active    false    full

[root@new-syasuda-tok1-vpc1 ~]# ibmcloud cis dns-records 5f94c1214644097571c114f70bcda563 | grep -e ID -e syasuda-ocp-ipi
ID                                 Name                                      Type    Content                                                                                           Proxied   TTL
bc4dae48dd1377a062bdf020d1b88bce   api-int.syasuda-ocp-ipi.cisxxxxxxxx.com   CNAME   9xxxxxxx-jp-tok.lb.appdomain.cloud                                                                false     60
6d867d24bd8e286e08365d1c16fab961   api.syasuda-ocp-ipi.cisxxxxxxxx.com       CNAME   3xxxxxxx-jp-tok.lb.appdomain.cloud                                                                false     60
b53af816e975b08dd58400f0f488a00d   *.apps.syasuda-ocp-ipi.cisxxxxxxxx.com    CNAME   exxxxxxx-jp-tok.lb.appdomain.cloud                                                                false     120
9
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?