Upgrading Docker
Upgrade Docker from version 18.09.7 to version 19.03.11 in your IBM® Cloud Private cluster that was installed by using the 3.2.1.2203 fix pack.
Note: The inception image tag follows the IBM® Cloud Private version installed on the customer's environment. To find the corresponding Docker version in the installer images, see Supported Docker versions.
Upgrading Docker when the boot node is not a master node
If your boot node is not a master node, complete these steps to upgrade Docker:
-
Log in to your boot node as a cluster administrator.
-
On the boot node, edit the
<installation_directory>/cluster/config.yamlfile and change thedocker_version.## Install/upgrade docker version docker_version: 19.03.11 -
Get the Docker package.
- For Linux® x86_64, run the following command:
docker run -d -it -e LICENSE=view -e LICENSE=accept --name container ibmcom/icp-inception-amd64:3.2.1.2203-ee bash - For Linux® on Power® (ppc64le), run the following command:
docker run -d -it -e LICENSE=view -e LICENSE=accept --name container ibmcom/icp-inception-ppc64le:3.2.1.2203-ee bash - For Linux® on IBM® Z and LinuxONE, run the following command:
docker run -d -it -e LICENSE=view -e LICENSE=accept --name container ibmcom/icp-inception-s390x:3.2.1.2203-ee bash
- For Linux® x86_64, run the following command:
-
Copy the Docker package from the container to the boot node.
-
For Linux® x86_64, run the following command:
docker cp container:/runtime-engine/icp-docker-19.03.11_x86_64.bin . -
For Linux® on Power® (ppc64le), run the following command:
docker cp container:/runtime-engine/icp-docker-19.03.11_ppc64le.bin . -
For Linux® on IBM® Z and LinuxONE, run the following command:
docker cp container:/runtime-engine/icp-docker-19.03.11_s390x.bin .
-
-
Remove the container:
docker kill container -
Set the executable mode.
- For Linux® x86_64, run the following command:
chmod +x icp-docker-19.03.11_x86_64.bin - For Linux® on Power® (ppc64le), run the following command:
chmod +x icp-docker-19.03.11_ppc64le.bin - For Linux® on IBM® Z and LinuxONE, run the following command:
chmod +x icp-docker-19.03.11_s390x.bin
- For Linux® x86_64, run the following command:
-
Create the
runtime-enginedirectory under theclusterdirectory.mkdir <installation_directory>/cluster/runtime-engine/ -
Copy the Docker package to the
runtime-enginedirectory.cp <Docker-package-file-path>/<Docker-package-file-name> <installation_directory>/cluster/runtime-engine/ -
Upgrade Docker by running the following command:
-
For Linux® x86_64, run the following command:
sudo docker run --net=host -t -e LICENSE=accept -v "$(pwd)":/installer/cluster ibmcom/icp-inception-amd64:3.2.1.2203-ee upgrade-docker -
For Linux® on Power® (ppc64le), run the following command:
sudo docker run --net=host -t -e LICENSE=accept -v "$(pwd)":/installer/cluster ibmcom/icp-inception-ppc64le:3.2.1.2203-ee upgrade-docker -
For Linux® on IBM® Z and LinuxONE, run the following command:
sudo docker run --net=host -t -e LICENSE=accept -v "$(pwd)":/installer/cluster ibmcom/icp-inception-s390x:3.2.1.2203-ee upgrade-docker
-
Upgrading Docker on the boot node when the boot node is a cluster node
If your boot node is also one of the cluster nodes, such as a master node, run these commands to upgrade the Docker version.
-
Cordon the master node.
kubectl cordon <master-node-IP-address>kubectl drain <master-node-IP-address> --ignore-daemonsets --delete-local-data --force --timeout=600s -
Upgrade Docker on the master node.
./<installation_directory>/cluster/runtime-engine/<Docker-binary-file-name> --upgradeFollowing is a sample output:
[20-08-13 19:23:38] ACTION: upgrade [20-08-13 19:23:38] DOCKER_ENV: [20-08-13 19:23:38] DOCKER_CONFIG: [20-08-13 19:23:38] Upgrading docker [20-08-13 19:23:39] Extracting docker.tar.gz [20-08-13 19:23:45] Upgrading docker package on Ubuntu 18.04 ./runtime-engine/icp-docker-19.03.11_x86_64.bin: line 271: rpm: command not found [20-08-13 19:25:07] Restarting docker service [20-08-13 19:25:10] Upgrade docker successfully. -
Uncordon the master node.
kubectl uncordon <master-node-IP-address>Following is a sample output:
node/10.11.18.99 uncordoned
After you upgrade, verify the Docker version on the nodes. If some pods are not successfully created, you must manually delete these pods to re-create them.
kubectl get nodes -o wide
Following is a sample output:
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
10.11.18.100 Ready worker 16h v1.13.12+icp-ee2003 10.11.18.100 <none> Ubuntu 18.04.5 LTS 4.15.0-112-generic docker://19.3.11
10.11.18.103 Ready worker 16h v1.13.12+icp-ee2003 10.11.18.103 <none> Ubuntu 18.04.5 LTS 4.15.0-112-generic docker://19.3.11
10.11.18.99 Ready etcd,management,master,proxy 17h v1.13.12+icp-ee2003 9.30.183.77 <none> Ubuntu 18.04.5 LTS 4.15.0-112-generic docker://19.3.11