7.3.16. 在用户置备的基础架构上完成安装

完成 Operator 配置后,可以在您提供的基础架构上完成集群安装。

先决条件

  • 您的 control plane 已初始化。
  • 已完成初始 Operator 配置。

流程

  1. 使用以下命令确认所有集群组件都已在线:

    $ watch -n5 oc get clusteroperators

    输出示例

    NAME                                       VERSION AVAILABLE   PROGRESSING   DEGRADED   SINCE
    authentication                             4.7.0   True        False         False      3h56m
    baremetal                                  4.7.0   True        False         False      29h
    cloud-credential                           4.7.0   True        False         False      29h
    cluster-autoscaler                         4.7.0   True        False         False      29h
    config-operator                            4.7.0   True        False         False      6h39m
    console                                    4.7.0   True        False         False      3h59m
    csi-snapshot-controller                    4.7.0   True        False         False      4h12m
    dns                                        4.7.0   True        False         False      4h15m
    etcd                                       4.7.0   True        False         False      29h
    image-registry                             4.7.0   True        False         False      3h59m
    ingress                                    4.7.0   True        False         False      4h30m
    insights                                   4.7.0   True        False         False      29h
    kube-apiserver                             4.7.0   True        False         False      29h
    kube-controller-manager                    4.7.0   True        False         False      29h
    kube-scheduler                             4.7.0   True        False         False      29h
    kube-storage-version-migrator              4.7.0   True        False         False      4h2m
    machine-api                                4.7.0   True        False         False      29h
    machine-approver                           4.7.0   True        False         False      6h34m
    machine-config                             4.7.0   True        False         False      3h56m
    marketplace                                4.7.0   True        False         False      4h2m
    monitoring                                 4.7.0   True        False         False      6h31m
    network                                    4.7.0   True        False         False      29h
    node-tuning                                4.7.0   True        False         False      4h30m
    openshift-apiserver                        4.7.0   True        False         False      3h56m
    openshift-controller-manager               4.7.0   True        False         False      4h36m
    openshift-samples                          4.7.0   True        False         False      4h30m
    operator-lifecycle-manager                 4.7.0   True        False         False      29h
    operator-lifecycle-manager-catalog         4.7.0   True        False         False      29h
    operator-lifecycle-manager-packageserver   4.7.0   True        False         False      3h59m
    service-ca                                 4.7.0   True        False         False      29h
    storage                                    4.7.0   True        False         False      4h30m

    或者,通过以下命令,如果所有集群都可用您会接到通知。它还检索并显示凭证:

    $ ./openshift-install --dir <installation_directory> wait-for install-complete 1
    1
    对于 <installation_directory>,请指定安装文件保存到的目录的路径。

    输出示例

    INFO Waiting up to 30m0s for the cluster to initialize...

    Cluster Version Operator 完成从 Kubernetes API 服务器部署 OpenShift Container Platform 集群时,命令运行成功。

    重要
    • 安装程序生成的 Ignition 配置文件包含在 24 小时后过期的证书,然后在过期时进行续订。如果在更新证书前关闭集群,且集群在 24 小时后重启,集群会自动恢复过期的证书。一个例外情况是,您需要手动批准待处理的 node-bootstrapper 证书签名请求(CSR)来恢复 kubelet 证书。如需更多信息,请参阅从过期的 control plane 证书中恢复的文档。
    • 建议您在生成 12 小时后使用 Ignition 配置文件,因为集群安装后 24 小时证书从 16 小时轮转至 22 小时。通过在 12 小时内使用 Ignition 配置文件,您可以避免在安装过程中运行证书更新时避免安装失败。
  2. 确认 Kubernetes API 服务器正在与 pod 通信。

    1. 要查看所有 pod 的列表,请使用以下命令:

      $ oc get pods --all-namespaces

      输出示例

      NAMESPACE                         NAME                                            READY   STATUS      RESTARTS   AGE
      openshift-apiserver-operator      openshift-apiserver-operator-85cb746d55-zqhs8   1/1     Running     1          9m
      openshift-apiserver               apiserver-67b9g                                 1/1     Running     0          3m
      openshift-apiserver               apiserver-ljcmx                                 1/1     Running     0          1m
      openshift-apiserver               apiserver-z25h4                                 1/1     Running     0          2m
      openshift-authentication-operator authentication-operator-69d5d8bf84-vh2n8        1/1     Running     0          5m
      ...

    2. 使用以下命令,查看上一命令的输出中所列 pod 的日志:

      $ oc logs <pod_name> -n <namespace> 1
      1
      指定 pod 名称和命名空间,如上一命令的输出中所示。

      如果 pod 日志显示,Kubernetes API 服务器可以与集群机器通信。

  3. 使用 Fibre Channel Protocol(FCP)安装需要额外的步骤来启用多路径。不要在安装过程中启用多路径。

    如需更多信息,请参阅安装后配置文档中的"使用 RHCOS 内核参数启用多路径"。

  4. Cluster registration 页面注册您的集群。