メインコンテンツまでスキップ

Coming soon...New Support-Specific categorization of Knowledge Articles in the NetApp Knowledge Base site to improve navigation, searchability and your self-service journey.

Trident 20.07.1 では、 iSCSI PVC の StorageClasses に「 parameter) .fsType 」が必要です ( fsGroups および Security Context Constraints を使用している場合)

Views:
54
Visibility:
Public
Votes:
0
Category:
trident-kubernetes
Specialty:
snapx
Last Updated:

に適用されます

Trident 20.07.1 以降 

Kubernetes 1.17 以降 

iSCSI バックエンド ( ONTAP 、 HCI / SolidFire ) 

問題

[1]Kubernetes =1.17 で Trident 20.07.1 以降のインストール / アップグレードを実行している場合、次の場合、新しく作成された iSCSI ボリュームは書き込み可能になりません。 

  1. storageClass が指定されていません “parameter.fsType” 

      および 

  1. 要求さfsGroupれた PVC を使用するポッドには、セキュリティ制約の一部として強制が適用されています。 

 

次に例podSpec を示します。 

--- 

apiVersion: v1 

kind: Pod 

metadata: 

  name: sec-ctx-pod 

spec: 

  securityContext: 

    runAsUser: 1000 

    runAsGroup: 3000 

    fsGroup: 2000 

  volumes: 

  - name: sec-ctx-vol 

    persistentVolumeClaim: 

      claimName: san-pvc 

  containers: 

  - name: sec-ctx-demo 

    image: busybox 

    command: [ "sh", "-c", "sleep 1h" ] 

    volumeMounts: 

    - name: sec-ctx-vol 

      mountPath: /data/demo 

    securityContext: 

      allowPrivilegeEscalation: false 

 

空の fsType を持つ PV に書き込みを試みると、「 permission denied 」エラーが発生します。 

Name:            pvc-b6bf10ac-6731-4b77-9963-b4d5516e4487 

Labels:         <none> 

Annotations:     pv.kubernetes.io/provisioned-by: csi.trident.netapp.io 

Finalizers:      [kubernetes.io/pv-protection external-attacher/csi-trident-netapp-io] 

StorageClass:    san-undefined-fstype 

Status:          Bound 

Claim:           default/san-pvc 

Reclaim Policy:  Delete 

Access Modes:    RWO 

VolumeMode:      Filesystem 

Capacity:        100Mi 

Node Affinity:  <none> 

Message: 

Source: 

    Type:              CSI (a Container Storage Interface (CSI) volume source) 

    Driver:            csi.trident.netapp.io 

    FSType:             

    VolumeHandle:      pvc-b6bf10ac-6731-4b77-9963-b4d5516e4487 

    ReadOnly:          false 

    VolumeAttributes:      backendUUID=115dc924-de93-4c8c-91be-5283c15a64f7 

                           internalName=trident_pvc_b6bf10ac_6731_4b77_9963_b4d5516e4487 

                           name=pvc-b6bf10ac-6731-4b77-9963-b4d5516e4487 

                           protocol=block 

                           storage.kubernetes.io/csiProvisionerIdentity=1602620905373-8081-csi.trident.netapp.io 

Events:               <none> 

 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

Scan to view the article on your device