Updating Z-stream of version in Openshift Container Platform
Whenever we want to upgrade the OCP to next recommended upgrade path, we want to first move to latest patch version of major and minor version of OCP we are running.
For instance, if your Openshift is version 4.15.11 (x.y.z) then,
Major (x) version is 4, Minor (y) version is 15 and patch (z) version is 11.
First update the master/control node and then worker nodes. The worker nodes in case of update can differ from control node by y-2. This allows to plan for update in large clusters that is staggered across in time.
With that bit cleared let us see the procedure to update the z version of OCP version.
1> Just run following to lists the compatible update releases
# oc adm upgrade
Or run below to see available updates,
# oc adm upgrade --include-not-recommended
Note: Always consult the OSUS upgrade Graph for valid path upgrades
2> After having made the decision, considering impact of updates on existing set-up, go ahead and update the control node.
# oc adm upgrade --to=4.15.33
3> To update worker nodes, one has to look into their Machine Control Pools (MCP)
# oc get mcp
4> Get the list of nodes
# oc get nodes
5> List the MCP that are paused.
# oc get mcp -o json | jq -r '["MCP","Paused"], ["---","------"], (.items[] | [(.metadata.name), (.spec.paused)]) | @tsv' | grep -v worker
6> Unpause one of the MCP pools, so that it starts upgrading one node at a time in the pool and node reboots after that.
# oc patch mcp/mcp-1 --type merge --patch '{"spec":{"paused":false}}'
Where mcp-1 is name of the pool
7> Confirm the mcp group is unpaused,
# oc get mcp -o json | jq -r '["MCP","Paused"], ["---","------"], (.items[] | [(.metadata.name), (.spec.paused)]) | @tsv' | grep -v worker
8> Check for the status of nodes in group that was unpaused are showing READY.
# oc get nodes
Here, check the columns NAME, STATUS, ROLES.
9> Check health of cluster
# oc get clusterversion
Progressing column should be false.
10> Check no other mcp groups are unpaused at the end of downtime.
11> Check cluster Operators
# oc get co
With Available having all True and Progressing column having all False.
12> Check pod health:
# oc get po -A | grep -E -iv 'complete|running'
This should not list any pods, which implies, all well post update.
Comments
Post a Comment