搜索

2.4. Upgrading to the latest OpenShift Container Platform release

download PDF

To upgrade an existing OpenShift Container Platform 3.10 or 3.11 cluster to the latest 3.11 release:

  1. Prepare for an upgrade to ensure you use the latest upgrade playbooks.
  2. Ensure the openshift_deployment_type parameter in your inventory file is set to openshift-enterprise.
  3. To enable rolling, full system restarts of the hosts, set the openshift_rolling_restart_mode parameter in your inventory file to system. Otherwise, the service is restarted on masters, but the systems do not reboot.

    注意

    The openshift_rolling_restart_mode only works for master hosts.

    See Configuring Cluster Variables for details.

  4. If you modified the oreg_url parameter to change the cluster image registry location, you must run the imageconfig playbook to update the image location:

    $ cd /usr/share/ansible/openshift-ansible
    $ ansible-playbook -i </path/to/inventory/file> \
        playbooks/openshift-node/imageconfig.yml \
  5. Upgrade your nodes.

    If your inventory file is located somewhere other than the default /etc/ansible/hosts, add the -i flag to specify its location. If you previously used the atomic-openshift-installer command to run your installation, you can check ~/.config/openshift/hosts for the last inventory file that was used.

    • To upgrade control plane and nodes in a single phase, run the upgrade.yml playbook:

      $ cd /usr/share/ansible/openshift-ansible
      $ ansible-playbook -i </path/to/inventory/file> \
          playbooks/byo/openshift-cluster/upgrades/v3_11/upgrade.yml
    • To upgrade the control plane and nodes in separate phases:

      1. Upgrade the control plane by running the upgrade_control_plane.yaml playbook:

        $ cd /usr/share/ansible/openshift-ansible
        $ ansible-playbook -i </path/to/inventory/file> \
            playbooks/byo/openshift-cluster/upgrades/v3_11/upgrade_control_plane.yml
      2. Upgrade the nodes by running the upgrade_nodes.yaml playbook:

        $ cd /usr/share/ansible/openshift-ansible
        $ ansible-playbook -i </path/to/inventory/file> \
            playbooks/byo/openshift-cluster/upgrades/v3_11/upgrade_nodes.yml \
            [-e <customized_node_upgrade_variables>] 1
        1
        See Customizing Node Upgrades for any desired <customized_node_upgrade_variables>.

        If you are upgrading the nodes in groups as described in Customizing Node Upgrades, continue running the upgrade_nodes.yml playbook until all nodes are upgraded.

  6. If you did not enable automated reboot of the master hosts by using openshift_rolling_restart variable=system in step 3 of this procedure, you can manually reboot all master hosts together with all node hosts after the upgrade has completed. Rebooting the hosts is optional.
  7. If you use aggregated logging, upgrade the EFK logging stack.
  8. If you use cluster metrics, upgrade cluster metrics.
  9. Verify the upgrade.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.