Retain PersistentVolumeClaims in a vFunction Server Helm Kubernetes Upgrade if the current Server version is below 4.3



Overview of the Issue

In vFunction Server Helm Kubernetes version 4.2 and below, the PersistentVolumeClaims could be deleted when the vFunction Server was upgraded to version 4.3 and later.

In an SSH session, the following event logging is displayed:

kubectl get event --sort-by='.metadata.managedFields[0].time'

3m4s   Warning FailedScheduling     pod/vfunction-storage-6587d79b9f-kkfsq         0/1 nodes are available: persistentvolumeclaim "vfunction-storage-pvc" is being deleted. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.

A review of the PVCs and PVs in the Namespace shows that there are no resources found.


Steps to Resolve the Issue

Take the following steps to resolve this issue:

  1. Restore the vFunction Server environment
  2. From the Portal, download vFunction Server Helm Kubernetes version 4.3.1790 or later
  3. Move the downloaded TGZ to the Linux VM with kubectl access to the Kubernetes Cluster where the vFunction Server installation was performed, specifically next to the vfunction-server-for-kubernetes/ directory
  4. Unpack the TGZ:
### Replace VERSION with the actual version
tar -xvzf vfunction-server-installation-helm-kubernetes.vVERSION.tgz
  1. To the Namespace, add annotations to keep the MySQL and Storage PVCs
### Replace NAMESPACE with the actual namespace
kubectl annotate pvc vfunction-mysql-pvc helm.sh/resource-policy=keep -n NAMESPACE --overwrite
kubectl annotate pvc vfunction-storage-pvc helm.sh/resource-policy=keep -n NAMESPACE --overwrite
  1. Move into the vfunction-server-for-kubernetes directory and run the upgrade script
### Replace NAMESPACE with the actual namespace
cd vfunction-server-for-kubernetes
bash upgrade.sh -n NAMESPACE