You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to deploy an application with a Persistent Volume Claim using a subPath, my pod stops with CreateContainerConfigError, and the error message is Error: stat /data/app: no such file or directory.
Hi @bitjson , thanks for opening this issue!
I just read through #764 before, so I may confuse some things here.
Your PV references the storage class local-path, which refers to K3s' https://github.com/rancher/local-path-provisioner, but then you create that PV manually, thus kind of working around the provisioner.
Anyway.. with the k3d command you issued, your local host path should be mounted into the nodes (containers) of the cluster. You can check that e.g. via docker exec k3d-development-cluster-server-0 ls /data.
When I try to deploy an application with a Persistent Volume Claim using a
subPath
, my pod stops withCreateContainerConfigError
, and the error message isError: stat /data/app: no such file or directory
.This looks like the same issue as kubernetes/minikube#2256, so it may be related to #764.
What did you do
How was the cluster created?
k3d cluster create development-cluster --servers 1 --agents 2 --volume $PWD/data:/data
What did you do afterwards?
I have a Helm chart which configures the following
PersistentVolume
:And a deployment which attempts to use it:
But when I deploy it, it fails with a
CreateContainerConfigError
:The error reads
Error: stat /data/app: no such file or directory
:What did you expect to happen
Here's a good description of
mountPath
vssubPath
.I expected the directory
data/app/app
on my local filesystem to be mounted inside the container at the path/data
.is a
I'm forced to use
subPath
because the container I'm running throws an error if its/data
directory is a direct mount point (and has alost+found
directory). That happens when I deploy this chart on GKE.This works properly in
k3d
without thesubPath
parameter, it only fails when I add thesubPath
.Also, I just confirmed that this configuration works as expected in GKE.
Which OS & Architecture
Which version of
k3d
Which version of docker
The text was updated successfully, but these errors were encountered: