Warning: detected changes to resource xxx which is currently being deleted
19:24 07 Jul 2023

Context: k3s cluster on multipass virtual machines.

I created a persistent volume and now I can not delete it. It got deleted but when I recreate it I got an error:

kubectl delete -f persistentVolume.yaml
persistentvolume "postgres-pv" deleted

but if I want to create the same volume

kubectl apply -f persistentVolume.yaml 

Warning: Detected changes to resource postgres-pv which is currently being deleted.

kind: PersistentVolume
apiVersion: v1
metadata:
  name: postgres-pv
    labels:
      app: postgres
      type: local
  spec:
    storageClassName: manual
    capacity:
      storage: 10Gi
    accessModes:
      - ReadWriteOnce
    hostPath:
      path: /pendrive/datakuber

And the path is empty.

kubernetes kubectl k3s