After you install vSphere Container Storage Plug-in in a native Kubernetes cluster, you can upgrade the plug-in to a newer version.
Procedures in this section apply only to native, also called vanilla, Kubernetes clusters deployed in vSphere environment. To upgrade vSphere with Tanzu, see vSphere with Tanzu Configuration and Management.
vSphere Container Storage Plug-in Upgrade Considerations and Guidelines
- Be familiar with installation prerequisites and procedures for vSphere Container Storage Plug-in. See Preparing for Installation of vSphere Container Storage Plug-in and Deploying the vSphere Container Storage Plug-in on a Native Kubernetes Cluster.
- Ensure that roles and privileges in your vSphere environment are updated. For more information, see vSphere Roles and Privileges.
- To upgrade to vSphere Container Storage Plug-in 2.3.0, you need DNS forwarding configuration in CoreDNS ConfigMap to help resolve vSAN file share hostname. For more information, see Configure CoreDNS for vSAN File Share Volumes.
- If you have RWM volumes backed by file service deployed using vSphere Container Storage Plug-in, remount the volumes before you upgrade vSphere Container Storage Plug-in.
- When upgrading from Beta topology to GA in vSphere Container Storage Plug-in, follow these recommendations. For information about deployments with topology, see Deploy vSphere Container Storage Plug-in with Topology.
- If you have used the topology feature in its Beta version on vSphere Container Storage Plug-in version 2.3 or earlier, upgrade vSphere Container Storage Plug-in to version 2.4.1 or later to be able to use the GA version of the topology feature.
- If you have used the Beta topology feature and plan to upgrade vSphere Container Storage Plug-in to version 2.4.1 or later, continue using only the
zone
andregion
parameters. - If you do not specify
Label
for a particular topology category while using thezone
andregion
parameters in the configuration file, vSphere Container Storage Plug-in assumes the default Beta topology behavior and appliesfailure-domain.beta.kubernetes.io/XYZ
labels on the node. You do not need to make a mandatory configuration change before upgrading the driver from Beta topology to GA topology feature.Earlier vSphere Secret Configuration vSphere Secret Configuration Before the Upgrade Sample Labels on a Node After the Upgrade [Labels] region = k8s-region zone = k8s-zone
[Labels] region = k8s-region zone = k8s-zone
Name: k8s-node-0179 Roles: <none> Labels: failure-domain.beta.kubernetes.io/region=region-1 failure-domain.beta.kubernetes.io/zone=zone-a Annotations: ....
- If you intend to use the topology GA labels after upgrading to vSphere Container Storage Plug-in 2.4.1 or later, make sure you do not have any pre-existing StorageClasses or PV node affinity rules pointing to the topology beta labels in the environment and then make the following change in the vSphere configuration secret.
Earlier vSphere Secret Configuration vSphere Secret Configuration Before the Upgrade Sample Labels on a Node After the Upgrade [Labels] region = k8s-region zone = k8s-zone
[Labels] region = k8s-region zone = k8s-zone [TopologyCategory "k8s-region"] Label = "topology.kubernetes.io/region" [TopologyCategory "k8s-zone"] Label = "topology.kubernetes.io/zone"
Name: k8s-node-0179 Roles: <none> Labels: topology.kubernetes.io/region=region-1 topology.kubernetes.io/zone=zone-a Annotations: ....
Remount ReadWriteMany Volumes Backed by vSAN File Service
If you have RWM volumes backed by vSAN file service, use this procedure to remount the volumes before you upgrade vSphere Container Storage Plug-in.
When you perform the following steps in a maintenance window, the process might disrupt active IOs on the file share volumes used by application pods. If you have multiple replicas of the pod that access the same file share volume, perform the following steps on each mount point serially to minimize downtime and disruptions.
Procedure
What to do next
After you have remounted all the vSAN file share volumes on the worker VMs, upgrade the vSphere Container Storage Plug-in by reinstalling its YAML files.
Upgrade vSphere Container Storage Plug-in of a Version Earlier than 2.3.0
If you use vSphere Container Storage Plug-in of a version earlier than 2.3.0, to perform an upgrade, you first need to uninstall the earlier version. You then install a version of your choice.
Procedure
Upgrade vSphere Container Storage Plug-in of a Version 2.3.0 or Later
If you use vSphere Container Storage Plug-in of a version 2.3.0 or later, you can perform rolling upgrades.
Procedure
Enable Volume Snapshot and Restore After an Upgrade to Version 2.5.x or Later
If you have upgraded vSphere Container Storage Plug-in from version 2.4.x to version 2.5.x or later, you can enable the volume snapshot and restore feature.
Procedure
- If you haven't previously enabled the snapshot feature and installed snapshot components, perform the following steps:
- If you have enabled the snapshot feature or if any snapshot components exist in the setup, follow these steps:
- Manually upgrade snapshot-controller and snapshot-validation-deployment to version 5.0.1.
For information, see https://github.com/kubernetes-csi/external-snapshotter.
- Enable the volume snapshot and restore functionality.
- Configure maximum number of snapshots per volume.
- Manually upgrade snapshot-controller and snapshot-validation-deployment to version 5.0.1.