desktop-linux icon indicating copy to clipboard operation
desktop-linux copied to clipboard

Kubernetes PV/PVC data lost after restarting Docker Desktop in Ubuntu

Open marianobrc opened this issue 2 years ago • 2 comments

  • [x] I have tried with the latest version of Docker Desktop
  • [x] I have tried disabling enabled experimental features
  • [ ] I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

Given that I'm running a Kubernetes cluster in Docker Desktop in Ubuntu And I'm using PersistentVolumes and PersistentVolumeClaims with a Retain policy to store my database data And I'm setting hostPath with a path pointing to a folder in my home directory like /home/dev/db-data/ When I restart Docker Desktop, for example after rebooting my computer Then I'd expect that the data saved in my persistent volumes is retained

Actual behavior

The data saved in my persistent volumes is gone after restarting Docker Desktop My local directory set is hotPath is always empty

Information

  • Linux distro: Ubuntu
  • Distro version: 20.04
  • Docker Desktop Version: 4.13

This doesn't happen with minikube. The data persists after a restart.

Steps to reproduce the behavior

  1. Enable Kubernetes in Docker Desktop
  2. Create a PersistentVolume with a hostPath to point to a local directory and a PersistentVolumeClaim to be used in some service
  3. Save some data in the volume
  4. Restart Docker Desktop
  5. The data is gone and the local directory is always empty

marianobrc avatar Oct 27 '22 17:10 marianobrc

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

docker-robott avatar Feb 28 '23 01:02 docker-robott

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

docker-robot[bot] avatar Jun 23 '23 01:06 docker-robot[bot]