Important: When should I take action?

Note: This blog details items to consider when:

  • upgrading Trident from 19.07.x or 19.10.x to 20.01.x and above.
  • upgrading Kubernetes to 1.17 and above.

Do you have alpha snapshots present?

Read this blog in its entirety if alpha snapshots exist. You will need to delete them or migrate them to the beta spec.

Please disregard this blog if you do not have any alpha snapshots. In this case, the Trident 20.xx installer will instruct you if and how you need to remove the alpha snapshot CRDs.

 

Kubernetes Beta Volume Snapshot API Backward [In]compatibility

To help accelerate customers’ cloud native journey and enable them to run their stateful applications in containers, the two most recent releases of Trident (19.07 and 19.10) enabled the creation of PVC snapshots using the Kubernetes volume snapshots alpha feature. As pointed out in our blogs, that was meant to provide a hands-on experience in a test or pre-production environment.

With the introduction of Kubernetes 1.17, volume snapshot moves to beta which is great news. However, the community made several significant changes to its API which are noteworthy. This includes modifications to the Custom Resource Definitions (CRDs) that will be required for VolumeSnapshots and a new snapshot controller that runs in the control plane, but chief among them is K8s beta volume snapshot API’s backward incompatibility that renders alpha snapshots unusable in Kubernetes 1.17 and above. With the expectation that alpha snapshots would not have been used in production, Kubernetes doesn’t provide a graceful way to migrate alpha snapshots to the beta spec available from K8s 1.17.

So, what does this mean for those who have been testing the alpha snapshot capability in Trident in earlier versions of Kubernetes?

  1. If you use Kubernetes 1.12 or earlier, there’s no impact.
  2. If you use Trident 19.04 or earlier, there’s no impact.

Alpha snapshots (which is a CSI feature) aren’t available prior to Kubernetes 1.12 and Trident 19.04.

For the above cases, it’s rather straight forward to upgrade to Kubernetes 1.17 and/or future versions of Trident, i.e. 20.01 and later:

  1. Uninstall Trident.
  2. Upgrade K8s to 1.17 and above.
  3. If desired, enable beta snapshot requirements. This includes creating the beta CRDs and defining the snapshot controller. 
  4. Install Trident 20.01 and above.

Upgrade Scenarios That May Be Impacted

As it pertains to Trident users, only those customers using alpha VolumeSnapshots with 19.07/19.10 must take specific steps as they ponder upgrading to Kubernetes 1.17 and/or future versions of Trident:

 

No alpha snapshot dependencies

This applies to Trident 19.07/19.10 installed base in test or pre-production environments where either alpha snapshots aren’t used or there’s no need to save any existing ones:

  1. Delete snapshots (if they exist). Ensure all Volume Snapshot, Volume Snapshot Classes and Volume Snapshot Content objects have been deleted.
  2. Uninstall Trident (and all other CSI plugins containing the alpha external-snapshotter CSI sidecar, if they exist) 
  3. Delete all CRDs used by the alpha spec using the 20.xx tridentctl binary to run tridentctl obliviate alpha-snapshot-crd.
  4. If desired, upgrade Kubernetes by following your K8s distributor’s recommendations.
  5. Install Trident 20.01 or above.

Note: The tridentctl obliviate alpha-snapshot-crd command listed above deletes the alpha snapshot CRDs, but not the CR objects. It is the K8s administrator’s responsibility to ensure all alpha snapshot CRs are deleted (step 1) before removing the CRDs.

 

Alpha snapshot dependency (Please use at your own discretion as it is unsupported)

In an unlikely scenario that some users may have inadvertently used the alpha snapshot feature for limited production and wish to save those snapshots, we have a set of instructions offered as is—without further support—to be used at your own discretion:

  1. Create a backup of all information related to the existing alpha snapshots (volume snapshot classes, volume snapshot contents and volume snapshot objects in K8s).
  2. Modify the Deletion Policy of all existing volume snapshot content objects to Retain.
  3. Delete the Volume Snapshots, Volume Snapshot Contents and Volume Snapshot Classes from k8s.
  4. Uninstall Trident (and all other CSI plugins containing the alpha external-snapshotter CSI sidecar)
  5. Delete all CRDs used by the alpha spec using the 20.xx tridentctl binary to run tridentctl obliviate alpha-snapshot-crd.
  6. Upgrade your k8s version to 1.17 or above if desired, while ensuring the requirements for beta snapshots are enabled (creating the beta CRDs and the snapshot-controller).
  7. Install Trident 20.01 or above.
  8. Use the saved information from step 1 to create beta volume snapshot classes, volume snapshot contents and volume snapshot objects after converting them to the beta spec.

This way, you can migrate existing alpha snapshots to the beta spec, should you choose to do so. Be advised that this is one possible way to migrate alpha snapshots if they exist. Moving forward, Trident will not support alpha volume snapshots.

Questions?

Reach out to us on our Slack channel for all the latest information on Trident.

Bala RameshBabu
Bala is a Technical Marketing Engineer who focuses on Trident, NetApp's dynamic storage provisioner for Kubernetes and Docker. With a background in OpenStack, he focuses on open-source solutions and DevOps workflows. When not at work, you can find him in a soccer field or reading biographies

Pin It on Pinterest