This documentation is for a previous release of Cloud Manager.
Go to the docs for the latest release.

Using ONTAP as persistent storage for Kubernetes

Contributors netapp-bcammett

Cloud Manager can automate the deployment of NetApp Trident on Kubernetes clusters so you can use ONTAP as persistent storage for containers. This works with Cloud Volumes ONTAP and on-prem ONTAP clusters.

Before you complete these steps, you need to create a Cloud Volumes ONTAP system or discover an on-premises ONTAP cluster from Cloud Manager.

If you deploy Kubernetes clusters using the NetApp Kubernetes Service, Cloud Manager can automatically discover the clusters from your NetApp Cloud Central account. If that’s the case, skip the first two steps and start with step 3.

Number 1 Verify network connectivity

  1. A network connection must be available between Cloud Manager and the Kubernetes clusters, and from the Kubernetes clusters to ONTAP systems.

  2. Cloud Manager needs an outbound internet connection to access the following endpoints when installing Trident:

    Cloud Manager installs Trident on a Kubernetes cluster when you connect a working environment to the cluster.

Number 2 Upload Kubernetes configuration files to Cloud Manager

For each Kubernetes cluster, the Account Admin needs to upload a configuration file (kubeconfig) that is in YAML format. After you upload the file, Cloud Manager verifies connectivity to the cluster and saves an encrypted copy of the kubeconfig file.

Click Kubernetes Clusters > Discover > Upload File and select the kubeconfig file.

A screenshot that shows the Kubernetes clusters tab with a Discover button and then the screen where you click Upload File to upload the kubeconfig file.

Number 3 Connect your working environments to Kubernetes clusters

From the working environment, click the Kubernetes icon and follow the prompts. You can connect different clusters to different ONTAP systems and multiple clusters to the same ONTAP system.

You have the option to set the NetApp storage class as the default storage class for the Kubernetes cluster. When a user creates a persistent volume, the Kubernetes cluster can use connected ONTAP systems as the backend storage by default.

A screenshot that shows the Kubernetes icon inside and Cloud Volumes ONTAP working environment and the subsequent page that enables you to select a Kubernetes cluster and then click Connect.

Number 4 Start provisioning Persistent Volumes

Request and manage Persistent Volumes using native Kubernetes interfaces and constructs. Cloud Manager creates four Kubernetes storage classes that you can use when provisioning Persistent Volumes:

  • netapp-file: for binding Persistent Volumes to single-node ONTAP systems

  • netapp-file-san: for binding iSCSI Persistent Volumes to single-node ONTAP systems

  • netapp-file-redundant: for binding Persistent Volumes to ONTAP HA pairs

  • netapp-file-redundant-san: for binding iSCSI Persistent Volumes to ONTAP HA pairs

Cloud Manager configures Trident to use the following provisioning options by default:

  • Thin volumes

  • The default Snapshot policy

  • Accessible Snapshot directory

What are the trident_trident volumes?

Cloud Manager creates a volume on the first ONTAP system that you connect to a Kubernetes cluster. The name of the volume is appended with "_trident_trident." ONTAP uses this volume to connect to the Kubernetes cluster. You should not delete these volumes.

What happens when you disconnect or remove a Kubernetes cluster?

Cloud Manager enables you to disconnect individual ONTAP systems from a Kubernetes cluster. When you disconnect a system, you can no longer use that ONTAP system as persistent storage for containers. Existing Persistent Volumes are not deleted.

After you disconnect all systems from a Kubernetes cluster, you can also remove the entire Kubernetes configuration from Cloud Manager. Cloud Manager does not uninstall Trident when you remove the cluster and it does not delete any Persistent Volumes.

Both of these actions are available through APIs only. We plan to add the actions to the interface in a future release.
Click here for details about the APIs.