嘗試裝載 File Storage for VPC時,為何我的應用程式 Pod 停留在 Container creating 中?

排除 VPC 叢集中建立檔案容器時的問題。

當您嘗試部署使用 File Storage for VPC 的應用程式時,您會看到下列一個或多個錯誤訊息。

取得 ibm-vpc-file-csi 驅動程式日誌的指令範例。

kubectl logs ibm-vpc-file-csi-node-xxx -n kube-system -c iks-vpc-file-node-driver

含有錯誤訊息的範例輸出。

ibmcsidriver/node.go:94","msg":"CSINodeServer-NodePublishVolume..."
ibmcsidriver/node.go:160","msg":"CSINodeServer-NodeUnpublishVolume..."

describe pod 指令範例。

kubectl describe pod ibm-vpc-file-csi-node-xxx -n kube-system -c iks-vpc-file-node-driver

含有錯誤訊息的範例輸出。

Warning FailedMount 68s kubelet MountVolume.SetUp failed for volume "pvc-c37fe511-ec6d-44c1-8c55-1b5e2c21ec5b" : rpc error: code = DeadlineExceeded desc = context deadline exceeded
Warning FailedMount 65s kubelet Unable to attach or mount volumes: unmounted volumes=[test-persistent-storage], unattached volumes=[], failed to process volumes=[]: timed out waiting for the condition

取得 pipelineruns 日誌的範例指令。

kubectl logs cat -n pipelineruns

含有錯誤訊息的範例輸出。

Error from server (BadRequest): container "cat" in pod "cat" is waiting to start: ContainerCreating

暫時網路中斷可能會導致檔案共用無法存取及無法裝載。

請完成下列步驟來解決問題。

4.11 及之後的版本引入了新的安全群組規則。 這些規則變更表示您必須先同步您的安全群組,才能使用 File Storage for VPC。 如果您的群集最初是在 4.11 或更早版本建立的,請執行下列指令同步您的安全群組設定。

  • 如果您的叢集最初是在4.11或更早版本建立的:

    1. 取得您的叢集 ID。
        ibmcloud oc cluster ls
        ```
    1. 取得 `kube-<clusterID>` 安全群組的ID。
    ```sh {: pre}
        ibmcloud is sg kube-<cluster-id>  | grep ID
        ```
    1. 使用您在上一個步驟中檢索到的 ID 同步 `kube-<clusterID>` 安全性群組。
    ```sh {: pre}
        ibmcloud ks security-group sync -c <cluster ID> --security-group <ID>
        ```
    
  • 如果您的叢集是在4.11及更高版本建立的,請驗證部署 pod 的工作節點是否在 VNI 安全群組允許名單中。

  1. 如果仍然發生此問題,請聯絡支援人員。 開啟 支援案例。 在案例詳細資料中,請務必包括任何相關日誌檔、錯誤訊息或指令輸出。