Deploy with Trident operator
You can deploy Astra Trident using the Trident operator.
Critical information about Astra Trident 22.10
You must read the following critical information before upgrading to Astra Trident 22.10.
Critical information about Astra Trident 22.10
|
Trident operator deployment options
You can deploy the Trident operator in one of two ways:
-
Using the Trident Helm Chart: The Helm Chart deploys the Trident operator and installs Trident in one step.
-
Manually: Trident provides a file that can be used to install the operator and create associated objects.
-
For clusters running Kubernetes 1.24 or lower, use bundle_pre_1_25.yaml.
-
For clusters running Kubernetes 1.25 or higher, use bundle_post_1_25.yaml.
-
If you have not already familiarized yourself with the basic concepts, now is a great time to do that. |
Verify prerequisites
To deploy Astra Trident, the following prerequisites should be met:
-
You have full privileges to a supported Kubernetes cluster running a supported version of Kubernetes. Review the requirements.
-
You have access to a supported NetApp storage system.
-
You have the capability to mount volumes from all of the Kubernetes worker nodes.
-
You have a Linux host with
kubectl
(oroc
, if you are using OpenShift) installed and configured to manage the Kubernetes cluster that you want to use. -
You have set the
KUBECONFIG
environment variable to point to your Kubernetes cluster configuration. -
You have enabled the feature gates required by Astra Trident.
-
If you are using Kubernetes with Docker Enterprise, follow their steps to enable CLI access.
Got all that? Great! Let's get started.
Deploy the Trident operator and install Astra Trident using Helm
Perform the steps listed to deploy the Trident operator by using Helm.
In addition to the prerequisites listed above, to deploy Trident operator by using Helm, you need the following:
-
Helm version 3
-
Add Trident's Helm repository:
helm repo add netapp-trident https://netapp.github.io/trident-helm-chart
-
Use the
helm install
command and specify a name for your deployment.
See the following example:helm install <name> netapp-trident/trident-operator --version 22.10.0 --create-namespace --namespace <trident-namespace>
If you already created a namespace for Trident, the --create-namespace
parameter will not create an additional namespace.
There are two ways to pass configuration data during the install:
-
--values
(or-f
): Specify a YAML file with overrides. This can be specified multiple times and the rightmost file will take precedence. -
--set
: Specify overrides on the command line.
For example, to change the default value of debug
, run the following --set
command:
helm install <name> netapp-trident/trident-operator --version 22.10.0 --create-namespace --namespace --set tridentDebug=true
The values.yaml
file, which is part of the Helm chart provides the list of keys and their default values.
helm list
shows you details about the installation, such as name, namespace, chart, status, app version, revision number, and so on.
Deploy the Trident operator manually and install Trident
Perform the steps listed to manually deploy the Trident operator.
Step 1: Qualify your Kubernetes cluster
The first thing you need to do is log in to the Linux host and verify that it is managing a working, supported Kubernetes cluster that you have the necessary privileges to.
With OpenShift, use oc instead of kubectl in all of the examples that follow, and log in as system:admin first by running oc login -u system:admin or oc login -u kube-admin .
|
To verify your Kubernetes version, run the following command:
kubectl version
To see if you have Kubernetes cluster administrator privileges, run the following command:
kubectl auth can-i '*' '*' --all-namespaces
To verify if you can launch a pod that uses an image from Docker Hub and reach your storage system over the pod network, run the following command:
kubectl run -i --tty ping --image=busybox --restart=Never --rm -- \ ping <management IP>
Step 2: Download and set up the operator
Beginning with 21.01, the Trident operator is cluster scoped. Using the Trident operator to install Trident requires creating the TridentOrchestrator Custom Resource Definition (CRD) and defining other resources. You should perform these steps to set up the operator before you can install Astra Trident.
|
-
Download and extract the latest version of the Trident installer bundle from the Assets section on GitHub.
wget https://github.com/NetApp/trident/releases/download/v22.10.0/trident-installer-22.10.0.tar.gz tar -xf trident-installer-22.10.0.tar.gz cd trident-installer
-
Use the appropriate CRD manifest to create the
TridentOrchestrator
CRD. You then create aTridentOrchestrator
Custom Resource later on to instantiate an installation by the operator.Run the following command:
kubectl create -f deploy/crds/trident.netapp.io_tridentorchestrators_crd_post1.16.yaml
-
After the
TridentOrchestrator
CRD is created, create the following resources required for the operator deployment:-
A ServiceAccount for the operator
-
A ClusterRole and ClusterRoleBinding to the ServiceAccount
-
A dedicated PodSecurityPolicy
-
The operator itself
The Trident installer contains manifests for defining these resources. By default, the operator is deployed in the
trident
namespace. If thetrident
namespace does not exist, use the following manifest to create one.kubectl apply -f deploy/namespace.yaml
-
-
To deploy the operator in a namespace other than the default
trident
namespace, you should update theserviceaccount.yaml
,clusterrolebinding.yaml
andoperator.yaml
manifests and generate yourbundle.yaml
.Run the following command to update the YAML manifests and generate your
bundle.yaml
using thekustomization.yaml
:kubectl kustomize deploy/ > deploy/bundle.yaml
Run the following command to create the resources and deploy the operator:
kubectl create -f deploy/bundle.yaml
-
To verify the status of the operator after you have deployed, do the following:
kubectl get deployment -n <operator-namespace> NAME READY UP-TO-DATE AVAILABLE AGE trident-operator 1/1 1 1 3m
kubectl get pods -n <operator-namespace> NAME READY STATUS RESTARTS AGE trident-operator-54cb664d-lnjxh 1/1 Running 0 3m
The operator deployment successfully creates a pod running on one of the worker nodes in your cluster.
There should only be one instance of the operator in a Kubernetes cluster. Do not create multiple deployments of the Trident operator. |
Step 3: Create TridentOrchestrator
and install Trident
You are now ready to install Astra Trident using the operator! This will require creating TridentOrchestrator
. The Trident installer comes with example definitions for creating TridentOrchestrator
. This kicks off an installation in the trident
namespace.
kubectl create -f deploy/crds/tridentorchestrator_cr.yaml tridentorchestrator.trident.netapp.io/trident created kubectl describe torc trident Name: trident Namespace: Labels: <none> Annotations: <none> API Version: trident.netapp.io/v1 Kind: TridentOrchestrator ... Spec: Debug: true Namespace: trident Status: Current Installation Params: IPv6: false Autosupport Hostname: Autosupport Image: netapp/trident-autosupport:22.10 Autosupport Proxy: Autosupport Serial Number: Debug: true Image Pull Secrets: Image Registry: k8sTimeout: 30 Kubelet Dir: /var/lib/kubelet Log Format: text Silence Autosupport: false Trident Image: netapp/trident:21.04.0 Message: Trident installed Namespace: trident Status: Installed Version: v21.04.0 Events: Type Reason Age From Message ---- ------ ---- ---- -------Normal Installing 74s trident-operator.netapp.io Installing Trident Normal Installed 67s trident-operator.netapp.io Trident installed
The Trident operator enables you to customize the manner in which Astra Trident is installed by using the attributes in the TridentOrchestrator
spec. See Customize your Trident deployment.
The Status of TridentOrchestrator
indicates if the installation was successful and displays the version of Trident installed.
Status | Description |
---|---|
Installing |
The operator is installing Astra Trident using this |
Installed |
Astra Trident has successfully installed. |
Uninstalling |
The operator is uninstalling Astra Trident, because |
Uninstalled |
Astra Trident is uninstalled. |
Failed |
The operator could not install, patch, update or uninstall |
Updating |
The operator is updating an existing installation. |
Error |
The |
During the installation, the status of TridentOrchestrator
changes from Installing
to Installed
. If you observe the Failed
status and the operator is unable to recover by itself, you should check the logs of the operator. See the troubleshooting section.
You can confirm if the Astra Trident installation completed by taking a look at the pods that have been created:
kubectl get pod -n trident NAME READY STATUS RESTARTS AGE trident-csi-7d466bf5c7-v4cpw 5/5 Running 0 1m trident-csi-mr6zc 2/2 Running 0 1m trident-csi-xrp7w 2/2 Running 0 1m trident-csi-zh2jt 2/2 Running 0 1m trident-operator-766f7b8658-ldzsv 1/1 Running 0 3m
You can also use tridentctl
to check the version of Astra Trident installed.
./tridentctl -n trident version +----------------+----------------+ | SERVER VERSION | CLIENT VERSION | +----------------+----------------+ | 21.04.0 | 21.04.0 | +----------------+----------------+
Now you can go ahead and create a backend. See post-deployment tasks.
For troubleshooting issues during deployment, see the troubleshooting section. |