#########################################################################################
#########################################################################################
GOAL:
This scenario is intended to see how easy it is to upgrade Trident.
Currently, Trident 24.02.0 is installed in this lab:
$ kubectl get tver -n trident NAME VERSION trident 24.02.0
Very important: You can perform a direct upgrade to any target release that is within a four-release window of your installed version. So technically you should first upgrade to 25.02.0 before jumping to 26.02.1. In this lab, it would be much faster (3x) to first fully uninstall Trident and then reinstall it with the new version.
The file trident_uninstall.sh can help you achieve this.
If you would like to uninstall it manually, here are the steps to run:
tridentctl -n trident delete backends --all
kubectl delete sc --all
kubectl patch torc trident --type=merge -p '{"spec":{"wipeout":["crds"],"uninstall":true}}'
helm delete trident -n trident
kubectl delete ns tridentNow we can proceed with the installation. Let's first download the version you would like to use.
Technically, if you decide to install Trident with Helm, you would not even need to perform this step, however throughout this lab, we will use the binary tridentctl a few times, so we still to download it.
cd mkdir 26.10.0 && cd 26.10.0 wget https://github.com/NetApp/trident/releases/download/v26.10.0/trident-installer-26.10.0.tar.gz tar -xf trident-installer-26.10.0.tar.gz rm -f /usr/bin/tridentctl ln -sf /root/26.10.0/trident-installer/tridentctl /usr/local/bin/tridentctl
Let's also enable Trident autocompletion:
mkdir -p ~/.bash/completions tridentctl completion bash > ~/.bash/completions/tridentctl-completion.bash source ~/.bash/completions/tridentctl-completion.bash echo 'source ~/.bash/completions/tridentctl-completion.bash' >> ~/.bashrc
๐
A resource is an endpoint in the Kubernetes API that stores a collection of API objects of a certain kind; for example, the built-in pods resource contains a collection of Pod objects.
A custom resource is an extension of the Kubernetes API that is not necessarily available in a default Kubernetes installation. It represents a customization of a particular Kubernetes installation. However, many core Kubernetes functions are now built using custom resources, making Kubernetes more modular.
๐
Trident 20.10 introduced the support of the CSI Topology feature which allows the administrator to manage a location aware infrastructure.
However, there are 2 requirements for this to work:
- You need at least Kubernetes 1.17 (:heavy_check_mark:!)
- Somes labels (region & zone) need to be added to the Kubernetes nodes before Trident is installed.
If you are planning on testing this feature (cf Scenario15), make sure these labels are configured before upgrading Trident.
$ kubectl get nodes --label-columns topology.kubernetes.io/region,topology.kubernetes.io/zone NAME STATUS ROLES AGE VERSION REGION ZONE rhel1 Ready <none> 73d v1.29.4 us-east1 us-east1-a rhel2 Ready <none> 73d v1.29.4 us-east1 us-east1-b rhel3 Ready control-plane 73d v1.29.4 us-east1 us-east1-a win1 Ready <none> 73d v1.29.4 win2 Ready <none> 73d v1.29.4
If they are not, you can create them with the following commands:
# LABEL "REGION" kubectl label node rhel1 "topology.kubernetes.io/region=dc" --overwrite kubectl label node rhel2 "topology.kubernetes.io/region=dc" --overwrite kubectl label node rhel3 "topology.kubernetes.io/region=dc" --overwrite # LABEL "ZONE" kubectl label node rhel1 "topology.kubernetes.io/zone=west" --overwrite kubectl label node rhel2 "topology.kubernetes.io/zone=west" --overwrite kubectl label node rhel3 "topology.kubernetes.io/zone=east" --overwrite
๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ
There is a configuration issue in the lab in its current setup.
The hosts rhel1 & rhel3 have the same NQN. Hence if you are planning on testing NVMe with Trident, you may have some odd side effects. You should then first modify rhel1.
You just need to update the /etc/nvme/hostid & /etc/nvme/hostnqn files. Changing the last character of their content is enough to have a stable configuration.
The following should do the trick:
sed -i -E 's/(e0e73e5d221)0/\11/' /etc/nvme/hostnqn sed -i -E 's/(e0e73e5d221)0/\11/' /etc/nvme/hostid
Note that for Trident to take this into account, you would normally need to restart the DaemonSet running on rhel1.
However, as this chapter focuses on upgrading Trident, the daemonsets are going to be automatically restarted anyway...
๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ
Last, if you have not yet read the Addenda08 about the Docker Hub management, it would be a good time to do so.
Also, if no action has been made with regards to the container images, you can find a shell script in the Scenario01 directory scenario01_pull_images.sh to pull images utilized in this scenario if needed:
sh scenario01_pull_images.sh
Now, it's time to proceed with the installation of Trident ๐ฑ!
Currently with the version 24.02, there are 5 ways to install Trident:
1. Using Helm to install Trident's operator, method introduced in 21.01
2. Using Trident's Operator, introduced in 20.04
[3.] Using the legacy way, via tridentctl (not detailed here)
[4.] Using a CD tool such as ArgoCD (check out Scenario18)
[5.] via the EKS Add-on marketplace in the AWS console (not detailed here)