You must upgrade the operator to the new version before you apply your custom resource
upgrades.
About this task
Tip: You can use upgrade the operator and keep the container image tags at the previous
versions.
Procedure
-
Log in to the target cluster.
oc login https://<CLUSTERIP>:<port> -u <ADMINISTRATOR>
oc project <project_name>
Where <project_name> is the target namespace.
-
Go to the downloaded
cert-kubernetes.git for 20.0.2, 20.0.2.1, or 20.0.3, and
change directory to cert-kubernetes.
- Optional:
If you have static storage on OCP, provide group write permission to the persistent volume (PV)
of the operator.
- According to the PV path definition
(/root/operator), run the following
commands.
chown -R :65534 /root/operator
chmod -R g+rw /root/operator
Group
ownership must be set to the anongid option given in the NFS export definition of
the NFS server associated with the PV. The default anongid value is
65534.
Remove the .OPERATOR_TYPE file in case it exists from a previous
deployment.
rm -f /<hostPath>/.OPERATOR_TYPE
Where
<path> is the value in your PV (root/operator).
-
Upgrade the
icp4a-operator on your cluster.
Use the
upgradeOperator.sh script to deploy the operator manifest descriptors.
./scripts/upgradeOperator.sh -i <registry_url>/icp4a-operator:<version> -p '<my_secret_name>' -a accept
Where registry_url is the value for your internal docker registry or
cp.icr.io/cp/cp4a for the IBM Cloud Entitled Registry. The <version> is 20.0.2, 20.0.2-IF001, or 20.0.3. The
my_secret_name is the secret that is created to access the registry, and
accept means that you accept the license.
Note: If you plan to use a non-administrator user to install the operator, you must add the user to
the
ibm-cp4-operator role.
oc adm policy add-role-to-user ibm-cp4a-operator <user_name>
Results
The operator is restarted and now pulls the new image. The wait time is normally minimal.
- wait_duration = 1 mn
- downtime = 0