# AKS-hosted AWX operator's dynamic PVC must be switched to a CSI-based PVC

**URL:** <https://forum.ansible.com/t/aks-hosted-awx-operators-dynamic-pvc-must-be-switched-to-a-csi-based-pvc/39592>\
**Category:** Get Help\
**Tags:** azure, kubernetes, awx-operator, awx\
**Created:** [January 14, 2025, 10:30am UTC](https://forum.ansible.com/t/aks-hosted-awx-operators-dynamic-pvc-must-be-switched-to-a-csi-based-pvc/39592 "2025-01-14T10:30:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pakhi2612](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/pakhi2612/32/7204_2.png) [@pakhi2612](https://forum.ansible.com/u/pakhi2612)\
**Post date:** [January 14, 2025, 10:30am UTC](https://forum.ansible.com/t/aks-hosted-awx-operators-dynamic-pvc-must-be-switched-to-a-csi-based-pvc/39592/1 "2025-01-14T10:30:16Z")

</div>

I have the AWX operator installed in an AKS environment. When creating the PVC, we initially used a dynamic provisioning approach with the storage class provisioner type `kubernetes.io/azure-disk`, but this is now deprecated. We need to switch to the `disk.csi.azure.com` provisioner type.

We followed the migration steps for transitioning from in-tree to CSI dynamic volumes as outlined in the Microsoft guide:

> **[Migrate from in-tree storage class to CSI drivers on Azure Kubernetes Service...](https://learn.microsoft.com/en-us/azure/aks/csi-migrate-in-tree-volumes)**
>
> Learn how to migrate from in-tree persistent volume to the Container Storage Interface (CSI) driver in an Azure Kubernetes Service (AKS) cluster.

After running the script, a new PVC has been created. Where should we make changes to attach the newly created PVC to AWX, so we can test whether the application is functioning as expected with the new PVC and PV?

```auto
#-> kubectl get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
azurefile file.csi.azure.com Delete Immediate true 279d
azurefile-csi file.csi.azure.com Delete Immediate true 279d
azurefile-csi-premium file.csi.azure.com Delete Immediate true 279d
azurefile-premium file.csi.azure.com Delete Immediate true 279d
default (default) disk.csi.azure.com Delete WaitForFirstConsumer true 279d
manage-azr-hvu-iautomatecluster-development-retain kubernetes.io/azure-disk Retain WaitForFirstConsumer true 245d
manage-premium-retain disk.csi.azure.com Retain WaitForFirstConsumer true 251d
managed disk.csi.azure.com Delete WaitForFirstConsumer true 279d
managed-csi disk.csi.azure.com Delete WaitForFirstConsumer true 279d
managed-csi-premium disk.csi.azure.com Delete WaitForFirstConsumer true 279d
managed-premium disk.csi.azure.com Delete WaitForFirstConsumer true 279d

#-> kubectl get pv,pvc -n awx
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
persistentvolume/pvc-043348db-676a-42bb-a0a5-3440309f9600 100Gi RWO Retain Bound awx/postgres-13-awx-dev-postgres-13-0 manage-azr-hvu-iautomatecluster-development-retain 245d

NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
persistentvolumeclaim/ **csi-postgres-13-awx-dev-postgres-13-0** Pending default 25d
persistentvolumeclaim/manage-azr-hvu-iautomatecluster-development-retain-claim Pending manage-azr-hvu-iautomatecluster-development-retain 245d
persistentvolumeclaim/postgres-13-awx-dev-postgres-13-0 Bound pvc-043348db-676a-42bb-a0a5-3440309f9600 100Gi RWO manage-azr-hvu-iautomatecluster-development-retain 245d

```

csi-postgres-13-awx-dev-postgres-13-0 is the new pvc and postgres-13-awx-dev-postgres-13-0 is the old pvc.

Need Assistance with steps to be perform for this migration or change of mapping.
