Manually deploy the Trident operator (Offline mode)
You can manually deploy the Trident operator to install Trident. This process applies to installations where the container images required by Trident are stored in a private registry. If you do not have a private image registry, use the process for standard deployment.
Critical information about Trident 24.10
You must read the following critical information about Trident.
Critical information about Trident
-
Kubernetes 1.31 is now supported in Trident. Upgrade Trident prior to upgrading Kubernetes.
-
Trident strictly enforces the use of multipathing configuration in SAN environments, with a recommended value of
find_multipaths: no
in multipath.conf file.Use of non-multipathing configuration or use of
find_multipaths: yes
orfind_multipaths: smart
value in multipath.conf file will result in mount failures. Trident has recommended the use offind_multipaths: no
since the 21.07 release.
Manually deploy the Trident operator and install Trident
Review the installation overview to ensure you've met installation prerequisites and selected the correct installation option for your environment.
Log in to the Linux host and verify it is managing a working and supported Kubernetes cluster and that you have the necessary privileges.
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 .
|
Details
-
Verify your Kubernetes version:
kubectl version
-
Verify cluster administrator privileges:
kubectl auth can-i '*' '*' --all-namespaces
-
Verify you can launch a pod that uses an image from Docker Hub and reach your storage system over the pod network:
kubectl run -i --tty ping --image=busybox --restart=Never --rm -- \ ping <management IP>
Step 1: Download the Trident installer package
The Trident installer package contains everything you need to deploy the Trident operator and install Trident. Download and extract the latest version of the Trident installer from the Assets section on GitHub.
wget https://github.com/NetApp/trident/releases/download/v24.10.0/trident-installer-24.10.0.tar.gz tar -xf trident-installer-24.10.0.tar.gz cd trident-installer
Step 2: Create the TridentOrchestrator
CRD
Create the TridentOrchestrator
Custom Resource Definition (CRD). You creates a TridentOrchestrator
Custom Resources later. Use the appropriate CRD YAML version in deploy/crds
to create the TridentOrchestrator
CRD:
kubectl create -f deploy/crds/<VERSION>.yaml
Step 3: Update the registry location in the operator
In /deploy/operator.yaml
, update image: docker.io/netapp/trident-operator:24.10.0
to reflect the location of your image registry. Your Trident and CSI images can be located in one registry or different registries, but all CSI images must be located in the same registry. For example:
-
image: <your-registry>/trident-operator:24.10.0
if your images are all located in one registry. -
image: <your-registry>/netapp/trident-operator:24.10.0
if your Trident image is located in a different registry from your CSI images.
Step 4: Deploy the Trident operator
The Trident installer provides a bundle file that can be used to install the operator and create associated objects. The bundle file is an easy way to deploy the operator and install Trident using a default configuration.
-
For clusters running Kubernetes 1.24, use
bundle_pre_1_25.yaml
. -
For clusters running Kubernetes 1.25 or later, use
bundle_post_1_25.yaml
.
-
By default, the Trident installer deploys the operator in the
trident
namespace. If thetrident
namespace does not exist, create it using:kubectl apply -f deploy/namespace.yaml
-
To deploy the operator in a namespace other than the
trident
namespace, updateserviceaccount.yaml
,clusterrolebinding.yaml
andoperator.yaml
and generate your bundle file using thekustomization.yaml
.-
Create the
kustomization.yaml
using the following command where <bundle.yaml> isbundle_pre_1_25.yaml
orbundle_post_1_25.yaml
based on your Kubernetes version.cp deploy/kustomization_<bundle.yaml> deploy/kustomization.yaml
-
Compile the bundle using using the following command where <bundle.yaml> is
bundle_pre_1_25.yaml
orbundle_post_1_25.yaml
based on your Kubernetes version.kubectl kustomize deploy/ > deploy/<bundle.yaml>
-
-
Create the resources and deploy the operator:
kubectl create -f deploy/<bundle.yaml>
-
Verify the operator, deployment, and replicasets were created.
kubectl get all -n <operator-namespace>
There should only be one instance of the operator in a Kubernetes cluster. Do not create multiple deployments of the Trident operator. |
Step 5: Update the image registry location in the TridentOrchestrator
Your Trident and CSI images can be located in one registry or different registries, but all CSI images must be located in the same registry. Update deploy/crds/tridentorchestrator_cr.yaml
to add the additional location specs based on your registry configuration.
imageRegistry: "<your-registry>" autosupportImage: "<your-registry>/trident-autosupport:24.10" tridentImage: "<your-registry>/trident:24.10.0"
imageRegistry: "<your-registry>" autosupportImage: "<your-registry>/trident-autosupport:24.10" tridentImage: "<your-registry>/trident:24.10.0"
Step 6: Create the TridentOrchestrator
and install Trident
You can now create the TridentOrchestrator
and install Trident. Optionally, you can further customize your Trident installation using the attributes in the TridentOrchestrator
spec. The following example shows an installation where Trident and CSI images are located in different registries.
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: Autosupport Image: <your-registry>/trident-autosupport:24.10 Debug: true Image Registry: <your-registry> Namespace: trident Trident Image: <your-registry>/trident:24.10.0 Status: Current Installation Params: IPv6: false Autosupport Hostname: Autosupport Image: <your-registry>/trident-autosupport:24.10 Autosupport Proxy: Autosupport Serial Number: Debug: true Http Request Timeout: 90s Image Pull Secrets: Image Registry: <your-registry> k8sTimeout: 30 Kubelet Dir: /var/lib/kubelet Log Format: text Probe Port: 17546 Silence Autosupport: false Trident Image: <your-registry>/trident:24.10.0 Message: Trident installed Namespace: trident Status: Installed Version: v24.10.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
Verify the installation
There are several ways to verify your installation.
Using TridentOrchestrator
status
The status of TridentOrchestrator
indicates if the installation was successful and displays the version of Trident installed. 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, check the logs.
Status | Description |
---|---|
Installing |
The operator is installing Trident using this |
Installed |
Trident has successfully installed. |
Uninstalling |
The operator is uninstalling Trident, because |
Uninstalled |
Trident is uninstalled. |
Failed |
The operator could not install, patch, update or uninstall |
Updating |
The operator is updating an existing installation. |
Error |
The |
Using pod creation status
You can confirm if the Trident installation completed by reviewing the status of the created pods:
kubectl get pods -n trident NAME READY STATUS RESTARTS AGE trident-controller-7d466bf5c7-v4cpw 6/6 Running 0 1m trident-node-linux-mr6zc 2/2 Running 0 1m trident-node-linux-xrp7w 2/2 Running 0 1m trident-node-linux-zh2jt 2/2 Running 0 1m trident-operator-766f7b8658-ldzsv 1/1 Running 0 3m
Using tridentctl
You can use tridentctl
to check the version of Trident installed.
./tridentctl -n trident version +----------------+----------------+ | SERVER VERSION | CLIENT VERSION | +----------------+----------------+ | 24.10.0 | 24.10.0 | +----------------+----------------+