Why has Kubernetes on Docker For desktop (Mac) Persistent Volume hostpath become laggy?

Viewed 117

I have been successfully using Kubernetes on Docker VM for local development by sharing IDE directories with pods (in deployments) to facilitate development.

apiVersion: v1
kind: PersistentVolume
metadata: 
  name: my-pv
spec: 
  capacity: 
    storage: 200Mi
  accessModes: 
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: my-storage
  local: 
    path: /Users/me/<path to IDE dir>
  nodeAffinity: 
    required: 
      nodeSelectorTerms: 
        - 
          matchExpressions: 
            - 
              key: kubernetes.io/hostname
              operator: In
              values: 
                - docker-desktop

Up until the last Docker update (Docker 3.0.3) or the latest MacOs update (Big Sur) or IntelliJ (2020.3 ultimate), changing a file in the IDE resulted in immediate visibility of the changes in the file on the Kubernetes pod in the Docker VM. Now unless I delete the file via the pod shell I don't see the change even if I kill the pod and it get's restarted by Kubernetes. If I add files to the directory on either the IDE or the pod shell they are visible in both.

I suspect the directory is partially cached or protected. Is there a way to prevent this?

0 Answers
Related