I have a Pod
apiVersion: v1
kind: Pod
metadata:
labels:
app: ...
name: ...
spec:
containers:
- name: ...
image: ...
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- mountPath: /var/run/containerd
name: containerd-dir
- mountPath: /var/run/containerd/containerd.sock
name: containerd
restartPolicy: Always
volumes:
- name: containerd
hostPath:
path: /var/run/k3s/containerd/containerd.sock
- name: containerd-dir
hostPath:
path: /var/run/containerd
which mounts the containerd.sock
. Inside the pod, I have nerdctl
installed (RUN /home/linuxbrew/.linuxbrew/bin/brew install nerdctl
)
I'm able to run nerdctl ps
successfully, and it returns a list of the running contains (that I ran from the host) - but when I try to run nerdctl run
, for example nerdctl run -d redis
, I get the error message
FATA[0000] no such file or directory
Running nerdctl --debug-full run -d redis
doesn't reveal anything
/# nerdctl --debug-full run redis
DEBU[0000] verification process skipped
FATA[0000] no such file or directory
nerdctl run
works fine when I run it on the host (targets the same containerd.sock
) and inside the pod when I run nerdctl ps
, I see the containers that I launched succeessfully on the host.
nerdctl pull
works fine from within the pod
Any ideas?