Upgrading IBM Storage Enabler for Containers
If you are already using earlier releases of IBM Storage Enabler for Containers, you can upgrade to the newer version without having to uninstall the previous one or using the installation package (*.tar) file.
Verify version of your current installation of IBM Storage Enabler for Containers. Only
version 1.1.0 of the package can be upgraded to version 1.2.0.
Perform the following procedure to upgrade IBM Storage Enabler for Containers:
-
Update the current deployment and DaemonSet images from version <current version
number> to <new version number> by running the following commands:
- kubectl set image daemonset/ubiquity-k8s-flex
ubiquity-k8s-flex=ibmcom/ibm-storage-flex-volume-for-kubernetes:<new version number> -n ubiquity - kubectl set image deployment/ubiquity-k8s-provisioner
ubiquity-k8s-provisioner=ibmcom/ibm-storage-dynamic-provisioner-for-kubernetes:<new version number> -n ubiquity - kubectl set image deployment/ubiquity
ubiquity=ibmcom/ibm-storage-enabler-for-containers:<new version number> -n ubiquity - kubectl set image deployment/ubiquity-db
ubiquity-db=ibmcom/ibm-storage-enabler-for-containers-db:<new version number> -n ubiquity
- kubectl set image daemonset/ubiquity-k8s-flex
-
Verify that the image update was successful by checking the status of the IBM Storage Enabler
for Containers pods. Navigate to the directory where the IBM Storage Enabler for Containers was
installed and run the following command ubiquity_cli.sh -a status_wide and check
that all relevant pods are in the Running state.
Note: You can also use the #> kubectl get -n ubiquity pod,daemonset,deployment -o wide command to verify the update.The image update is finished.
-
Configure the directory and the maximum file size of the Flex log file, as follows:
- On the controller-manager pod of every master node in Kubernetes cluster:
- Stop the controller-manager pod by moving the kube-controller-manager.yml file to temporary directory: mv /etc/kubernetes/manifests/kube-controller-manager.yml /tmp.
- Edit the kube-controller-manager.yml file: vi
/tmp/kube-controller-manager.yml.
- Add the following lines under the volumes
tag.
- hostPath: path: /var/log type: DirectoryOrCreate name: flexlog-dir - Add the following lines under the volumeMounts tag:
- mountPath: /var/log name: flexlog-dir - Restart the controller-manager pod by moving the
kube-controller-manager.yml file to its original location:
mv /tmp/kube-controller-manager.yml /etc/kubernetes/manifests/. - Verify that the controller-manager pod is in the Running state: kubectl get pod -n kube-system | grep controller-manager.
- Add the following lines under the volumes
tag.
- Add the FLEX-LOG-DIR and FLEX-LOG-ROTATE-MAXSIZE
parameters to the ubiquity-configmap file by entering them under
data.
configmap/ubiquity-configmap -n ubiquity FLEX-LOG-DIR: /var/log FLEX-LOG-ROTATE-MAXSIZE: "50" - Add the FLEX-LOG-DIR and FLEX-LOG-ROTATE-MAXSIZE
parameters to the ubiquity-k8s-flex-daemonset.yml file in the following file sections:
envs - name: FLEX_LOG_DIR # /var/log default valueFrom: configMapKeyRef: name: ubiquity-configmap key: /var/log - name: FLEX_LOG_ROTATE_MAXSIZE # 50MB default valueFrom: configMapKeyRef: name: ubiquity-configmap key: FLEX-LOG-ROTATE-MAXSIZE volumeMounts - name: flex-log-dir mountPath: /var/log volumes - name: flex-log-dir hostPath: path: /var/log
- On the controller-manager pod of every master node in Kubernetes cluster:
-
After the update, change the image version from <current version number> to <new version
number> in all relevant yml files. Otherwise, you will not be able to start the
images using ubiquity_cli.sh -a start. Use the following procedure:
- Navigate to your installer directory and go the /yaml folder in it.
- Locate the following yml files:
- ubiquity-deployment.yml
- ubiquity-k8s-provisioner-deployment.yml
- ubiquity-k8s-flex-daemonset.yml
- ubiquity-db-deployment.yml
- Edit the files and manually change the image version from <current version number> to <new version number>. For example, image: ibmcom/ibm-storage-enabler-for-containers-db:<current version number> to image: ibmcom/ibm-storage-enabler-for-containers-db:<new version number>.