How to Canary Update Infra Node when Doing Canary Update from OpenShift 4.13 -> 4.14
Image by Caroly - hkhazo.biz.id

How to Canary Update Infra Node when Doing Canary Update from OpenShift 4.13 -> 4.14

Posted on

Welcome to the world of container orchestration! If you’re reading this, you’re likely an OpenShift enthusiast looking to upgrade from version 4.13 to 4.14 while ensuring a seamless canary update experience for your infra nodes. You’re in the right place! In this comprehensive guide, we’ll walk you through the step-by-step process of canary updating your infra nodes, highlighting the essential considerations and best practices to ensure a successful transition.

Understanding Canary Updates

Before we dive into the nitty-gritty, let’s quickly cover the basics. A canary update is an incremental rollout strategy where you update a small subset of nodes (the canary) with the new version, while the majority of nodes remain on the previous version. This approach allows you to test the new version in a controlled environment, identify potential issues, and roll back if needed, all while minimizing the impact on your production workload.

Why Canary Update Infra Nodes?

Infra nodes, being the backbone of your OpenShift cluster, require special attention during an update. Canary updating these nodes ensures that you can:

  • Validate the compatibility of the new OpenShift version with your infrastructure
  • Test the upgrade process in a non-production environment
  • Identify and address potential issues before rolling out the update to the entire cluster

Preparing for the Canary Update

Before you begin, make sure you have:

  • A functioning OpenShift 4.13 cluster with infra nodes
  • A clear understanding of your cluster’s architecture and node roles
  • A backup of your cluster’s configuration and data (just in case!)

Choose the Right Nodes for the Canary Update

Identify the infra nodes that will participate in the canary update. These nodes should:

  • Not be critical to your production workload
  • Have minimal impact on your cluster’s overall performance
  • Be easily replaceable in case of an update failure

Tip: Consider selecting nodes with a low workload or those that are easily reprovisionable. This will minimize the risk of disrupting your production environment.

The Canary Update Process

Now that you’ve prepared your environment, it’s time to begin the canary update process.

Step 1: Create a New MachineConfigPool

Create a new MachineConfigPool for the infra nodes participating in the canary update. This pool will contain the updated OpenShift version:

$ oc create machineconfigpool canary-4-14 --role infra

Step 2: Update the MachineConfigPool

Apply the OpenShift 4.14 update to the newly created MachineConfigPool:

$ oc patch machineconfigpool canary-4-14 --type='json' -p='[{"op": "replace", "path": "/spec/configuration/version", "value": "4.14.0"}]'

Step 3: Add Nodes to the MachineConfigPool

Add the selected infra nodes to the updated MachineConfigPool:

$ oc label node  machineconfiguration.openshift.io/machine-config-pool=canary-4-14

Replace `` with the actual name of the infra node you want to add to the pool.

Step 4: Wait for the Update to Complete

Monitor the update process and wait for the nodes to complete the transition to OpenShift 4.14. You can check the node status using:

$ oc get nodes -l machineconfiguration.openshift.io/machine-config-pool=canary-4-14

Step 5: Verify the Update

Verify that the infra nodes have successfully updated to OpenShift 4.14:

$ oc describe node  | grep "OpenShift Version"

Replace `` with the actual name of the infra node you updated.

Post-Update Tasks

Once the canary update is complete, perform the following tasks:

Monitor Cluster Performance

Keep a close eye on your cluster’s performance and watch for any signs of issues or instability.

Test Workloads

Verify that your workloads are functioning as expected on the updated infra nodes.

Roll Out the Update to the Entire Cluster

If the canary update is successful, you can roll out the OpenShift 4.14 update to the entire cluster:

$ oc patch machineconfigpool worker --type='json' -p='[{"op": "replace", "path": "/spec/configuration/version", "value": "4.14.0"}]'

Replace `worker` with the actual name of the MachineConfigPool for your worker nodes.

Troubleshooting Common Issues

During the canary update process, you might encounter the following issues:

Node Update Failures

If a node fails to update, investigate the cause and resolve the issue before proceeding. You can check the node’s update status using:

$ oc describe node  | grep "Update Status"

Cluster Instability

If the cluster becomes unstable after the update, roll back the canary nodes to the previous version:

$ oc patch machineconfigpool canary-4-14 --type='json' -p='[{"op": "replace", "path": "/spec/configuration/version", "value": "4.13.0"}]'

Replace `4.13.0` with the previous version of OpenShift.

Conclusion

Congratulations! You’ve successfully canary updated your infra nodes from OpenShift 4.13 to 4.14. By following this guide, you’ve ensured a smooth and controlled transition to the new version, minimizing the risk of disruption to your production workload.

Remember to continue monitoring your cluster’s performance and address any issues that may arise. Happy upgrading!

OpenShift Version Canary Update Node Count Update Status
4.14.0 2 In Progress
4.13.0 3 Completed

This table provides a sample summary of the canary update process, including the OpenShift version, number of nodes participating in the canary update, and the update status.

I hope this article meets your requirements!

Frequently Asked Question

Get ready to soar into the world of canary updates with our expert answers!

What is the recommended approach to update an infra node when doing a canary update from OpenShift 4.13 to 4.14?

When performing a canary update, it’s essential to update the infra node before running the upgrade playbooks. This ensures that the node is running the latest version of OpenShift. To do this, you’ll need to cordon the infra node, drain its workload, and then update the node using the `oc adm upgrade` command. Once the update is complete, you can uncordon the node and move on to the next step.

How do I ensure that my infra node is correctly configured for the canary update?

Before updating your infra node, make sure to verify that it’s properly configured by checking the node’s labels, taints, and tolerations. You can do this using the `oc describe node` command. Additionally, ensure that the node is not schedulable by running `oc adm cordon `. This will prevent any new workloads from being scheduled on the node during the update process.

What happens if my infra node fails during the canary update process?

Don’t panic! If your infra node fails during the update process, you can safely abort the update and restore the node to its previous state. To do this, run the `oc adm upgrade –rollback` command. This will revert the node to its previous version of OpenShift. Once the rollback is complete, you can troubleshoot the issue and try the update again.

How do I verify that my infra node has been successfully updated to OpenShift 4.14?

After updating your infra node, you can verify its version by running the `oc get node` command. Check the `openshiftVersion` field to ensure it’s updated to 4.14. Additionally, you can check the node’s logs for any errors or issues related to the update process. If everything looks good, you can uncordon the node and move on to the next step in your canary update journey!

What’s the best practice for updating multiple infra nodes during a canary update?

When updating multiple infra nodes, it’s essential to update them one by one to avoid any disruptions to your cluster. Update each node separately, following the same process of cordoning, draining, updating, and uncording. This ensures that your cluster remains stable and functional throughout the update process. Additionally, consider creating a rolling update strategy to minimize downtime and ensure high availability.