Perform backend management with kubectl
Learn about how to perform backend management operations by using kubectl
.
Delete a backend
By deleting a TridentBackendConfig
, you instruct Trident to delete/retain backends (based on deletionPolicy
). To delete a backend, ensure that deletionPolicy
is set to delete. To delete just the TridentBackendConfig
, ensure that deletionPolicy
is set to retain. This ensures the backend is still present and can be managed by using tridentctl
.
Run the following command:
kubectl delete tbc <tbc-name> -n trident
Trident does not delete the Kubernetes Secrets that were in use by TridentBackendConfig
. The Kubernetes user is responsible for cleaning up secrets. Care must be taken when deleting secrets. You should delete secrets only if they are not in use by the backends.
View the existing backends
Run the following command:
kubectl get tbc -n trident
You can also run tridentctl get backend -n trident
or tridentctl get backend -o yaml -n trident
to obtain a list of all backends that exist. This list will also include backends that were created with tridentctl
.
Update a backend
There can be multiple reasons to update a backend:
-
Credentials to the storage system have changed. To update credentials, the Kubernetes Secret that is used in the
TridentBackendConfig
object must be updated. Trident will automatically update the backend with the latest credentials provided. Run the following command to update the Kubernetes Secret:kubectl apply -f <updated-secret-file.yaml> -n trident
-
Parameters (such as the name of the ONTAP SVM being used) need to be updated.
-
You can update
TridentBackendConfig
objects directly through Kubernetes using the following command:kubectl apply -f <updated-backend-file.yaml>
-
Alternatively, you can make changes to the existing
TridentBackendConfig
CR using the following command:kubectl edit tbc <tbc-name> -n trident
-
|