OpenShift cluster of 4 how to upgrade through the Cluster Version Operator?

OpenShift upgrade 4 provides "over-the-air" feature to upgrade OpenShift clusters and the underlying Linux, the most critical of which is the use of CVO (Cluster Version Operator) to realize the automatic upgrade to a clustered environment. CVO according to the current environment will first see if there is a legitimate upgrade version, and based on the current version of the upgrade path when upgrading will find CVO configuration is passed to the new version of the Machine Config Operator, MCO is responsible for the management node host, host environment ( including CoreOS and OCP) upgrade can only be done by MCO.
Here Insert Picture Description
In order not to affect the business of continuous operation, MCO is a way to get through a rolling upgrade of each node. The upgrade process is performed by each node of the Machine Config Daemons, it downloads the upgrade medium, then a node upgrade.
Here Insert Picture Description
We can check the status of CVO in the following ways. When closed the CVO time, the number of all "0", then OpenShift cluster will not be able to upgrade.

$ oc get deployments -n openshift-cluster-version
NAME                       DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
cluster-version-operator   1         1         1            1           2h

You can view the log CVO run in the following ways, including "Started", "Desired", "Finished" and other different states.

$ oc logs deployments/cluster-version-operator -n openshift-cluster-version > operatorlog.txt
$ tail operatorlog.txt
。。。
I0514 20:48:20.887420       1 cvo.go:336] Started syncing cluster version "openshift-cluster-version/version" (2019-05-14 20:48:20.88740786 +0000 UTC m=+87191.276686302)
I0514 20:48:20.887478       1 cvo.go:364] Desired version from operator is v1.Update{Version:"4.1.0-rc.3", Image:"quay.io/openshift-release-dev/ocp-release@sha256:713aae8687cf8a3cb5c2c504f655
32dfe11e1b3534448ea9eeef5b0931d3e208", Force:false}
I0514 20:48:20.887574       1 cvo.go:338] Finished syncing cluster version "openshift-cluster-version/version" (162.252µs)
I0514 20:48:35.887466       1 cvo.go:336] Started syncing cluster version "openshift-cluster-version/version" (2019-05-14 20:48:35.887452731 +0000 UTC m=+87206.276731165)
I0514 20:48:35.887651       1 cvo.go:364] Desired version from operator is v1.Update{Version:"4.1.0-rc.3", Image:"quay.io/openshift-release-dev/ocp-release@sha256:713aae8687cf8a3cb5c2c504f655
32dfe11e1b3534448ea9eeef5b0931d3e208", Force:false}
I0514 20:48:35.887738       1 cvo.go:338] Finished syncing cluster version "openshift-cluster-version/version" (280.777µs)
I0514 20:48:50.887443       1 cvo.go:336] Started syncing cluster version "openshift-cluster-version/version" (2019-05-14 20:48:50.887431061 +0000 UTC m=+87221.276709496)
I0514 20:48:50.887516       1 cvo.go:364] Desired version from operator is v1.Update{Version:"4.1.0-rc.3", Image:"quay.io/openshift-release-dev/ocp-release@sha256:713aae8687cf8a3cb5c2c504f655
32dfe11e1b3534448ea9eeef5b0931d3e208", Force:false}
I0514 20:48:50.887675       1 cvo.go:338] Finished syncing cluster version "openshift-cluster-version/version" (239.797µs)
。。。
Published 54 original articles · won praise 0 · Views 1120

Guess you like

Origin blog.csdn.net/weixin_43902588/article/details/103551336
Recommended