Trident をインストール
Helm を使用して Trident をインストールするには、次の手順を実行します。
-
Helmをインストールします(インストール手順については、を参照してください "ソース")。
-
Trident 20.01.1 インストーラをダウンロードして展開します。
$wget $tar -xf trident-installer-21.01.1.tar.gz
-
ディレクトリをに変更します
trident-installer
。$cd trident-installer
-
システムのディレクトリに `$PATH`コピーし `tridentctl`ます。
$sudo cp ./tridentctl /usr/local/bin
-
Helm()を使用してKubernetes(K8s)クラスタにTridentをインストールし "ソース"ます。
-
ディレクトリをディレクトリに変更します
helm
。$cd helm
-
Trident をインストール
$helm install trident trident-operator-21.01.1.tgz --namespace trident --create-namespace
-
Trident ポッドのステータスを確認
$kubectl -n trident get pods
すべてのポッドが稼働中の場合は、 Trident がインストールされてから次のポッドに移動できます。
-
-
AKS の Azure NetApp Files バックエンドとストレージクラスをセットアップします。
-
Azure サービスプリンシパルを作成します。
サービスプリンシパルは、 Trident が Azure と通信して Azure NetApp Files リソースを操作する方法を示します。
$az ad sp create-for-rbac --name ""
出力は次の例のようになります。
{ "appId": "xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "displayName": "netapptrident", "name": "", "password": "xxxxxxxxxxxxxxx.xxxxxxxxxxxxxx", "tenant": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" }
-
-
TridentバックエンドJSONファイル(例:name)を作成します
anf-backend.json
。 -
任意のテキストエディタを使用して、ファイル内の次のフィールドに値を入力し `anf-backend.json`ます。
{ "version": 1, "storageDriverName": "azure-netapp-files", "subscriptionID": "fakec765-4774-fake-ae98-a721add4fake", "tenantID": "fakef836-edc1-fake-bff9-b2d865eefake", "clientID": "fake0f63-bf8e-fake-8076-8de91e57fake", "clientSecret": "SECRET", "location": "westeurope", "serviceLevel": "Standard", "virtualNetwork": "anf-vnet", "subnet": "default", "nfsMountOptions": "vers=3,proto=tcp", "limitVolumeSize": "500Gi", "defaults": { "exportRule": "0.0.0.0/0", "size": "200Gi" }
-
次のフィールドを置き換えます。
-
`subscriptionID`です。お客様の Azure サブスクリプション ID
-
tenantID`です。前の手順のの出力に表示されたAzureテナントID `az ad sp
。 -
clientID`です。前の手順での出力から取得したappID `az ad sp
。 -
clientSecret`です。前の手順のの出力で確認したパスワード `az ad sp
。
-
-
を構成ファイルとして使用して、ネームスペースに `anf-backend.json`Azure NetApp Filesバックエンドを作成するようにTridentに指示し `trident`ます。
$tridentctl create backend -f anf-backend.json -n trident
-
ストレージクラスを作成する。Kubernetes ユーザは、名前でストレージクラスを指定する PVC を使用してボリュームをプロビジョニングします。Kubernetesで、前の手順で作成したTridentバックエンドを参照するストレージクラスを作成するように指示します
azurenetappfiles
。 -
(`anf-storage-class.yaml`ストレージクラス用のYAML)ファイルを作成し、コピーします。
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: azurenetappfiles provisioner: netapp.io/trident parameters: backendType: "azure-netapp-files" $kubectl create -f anf-storage-class.yaml
-
ストレージクラスが作成されたことを確認します。
kubectl get sc azurenetappfiles