How to configure csi in azure, currently my configured CSI has been unable to take effect, pod is in pending state

website 0 Reputation points
2023-07-08T03:07:46.6333333+00:00

User's image

Here are the controll pod logs

User's image

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,448 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Rishikesh Singh 470 Reputation points
    2023-07-15T12:50:05.15+00:00
    To configure CSI (Container Storage Interface) in Azure, you need to follow these general steps:
    
        Provision Azure Kubernetes Service (AKS): Set up an AKS cluster in Azure that will serve as the Kubernetes environment where CSI will be deployed.
    
        Install CSI Driver: Determine the CSI driver you want to use for storage provisioning. Some popular options for Azure include Azure Disk CSI Driver and Azure File CSI Driver. Refer to the specific documentation for the chosen driver for installation instructions.
    
        Configure Azure Storage Account: Create an Azure Storage Account to be used for CSI. This storage account will be used to provision and manage storage resources for your AKS cluster.
    
        Configure Secrets: Create Kubernetes secrets to securely store the credentials required to access the Azure Storage Account. This step ensures that the CSI driver can authenticate and interact with the storage account.
    
        Deploy CSI Driver: Use Kubernetes manifests or Helm charts provided by the CSI driver documentation to deploy the CSI driver to your AKS cluster. The driver deployment typically involves creating pods, services, and other Kubernetes resources.
    
        Create Storage Classes: Define storage classes in Kubernetes that map to the Azure storage options you want to use. Storage classes specify the provisioning parameters, such as storage account, access type, and replication options.
    
        Provision Persistent Volumes (PVs): Create Persistent Volumes using the defined storage classes. PVs represent the actual storage resources that can be dynamically provisioned and used by Kubernetes workloads.
    
        Mount Volumes: Mount the PVs to your Kubernetes pods by referencing the Persistent Volume Claim (PVC) in the pod's specification. This step allows your application to utilize the provisioned storage.
    
        Test and Validate: Deploy and test your applications or workloads that utilize the provisioned storage. Ensure that the storage is accessible and functions as expected.
    
    
    

    please accept answer of this helped

    0 comments No comments

  2. vipullag-MSFT 26,487 Reputation points Moderator
    2023-07-17T08:51:23.7166667+00:00

    Hello website

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    What CSI driver did you install?
    You can run kubectl describe pod pod-name to check which driver pod is not running well.

    I guess the CSI controller pod should have multiple containers and one of them sets up /csi/csi.sock which gets mounted by all containers inside the controller pod. 

    Can you please see any the containers inside the CSI controller pod are NOT in Ready state or restarting frequently?  If that is the case, then you need to fix that container first. 

    Hope this helps.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.