2.4. Upgrading to the latest OpenShift Container Platform release
To upgrade an existing OpenShift Container Platform 3.10 or 3.11 cluster to the latest 3.11 release:
- Prepare for an upgrade to ensure you use the latest upgrade playbooks.
-
Ensure the
openshift_deployment_type
parameter in your inventory file is set toopenshift-enterprise
. To enable rolling, full system restarts of the hosts, set the
openshift_rolling_restart_mode
parameter in your inventory file tosystem
. 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.
If you modified the
oreg_url
parameter to change the cluster image registry location, you must run theimageconfig
playbook to update the image location:$ cd /usr/share/ansible/openshift-ansible $ ansible-playbook -i </path/to/inventory/file> \ playbooks/openshift-node/imageconfig.yml \
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 theatomic-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:
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
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.
-
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. - If you use aggregated logging, upgrade the EFK logging stack.
- If you use cluster metrics, upgrade cluster metrics.
- Verify the upgrade.