Skip to content

Persistent Volume

All settings of the application are internally stored in a small sqlite database which must reside on a persistent volume to survive pod restarts. The same persistent volume is also used to store proxy access logs, statistics and reporting files.

This persistent volume will be created automatically in Microsoft Azure Kubernetes Service but we would need to manually claim that volume by running the following command.

kubectl apply -f cloud-proxy-ui-pvc-aks.yaml --validate

The following listing shows the persistent volume claim.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: cloud-proxy-ui
spec:
  resources:
    requests:
      storage: 10Gi
  accessModes:
    - ReadWriteOnce

The output of kubectl get pvc will show our claim as pending which is for now expected.

# kubectl get pvc
NAME             STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
cloud-proxy-ui   Pending                                      default        7s