I have an Ubuntu Server in my basement running MicroK8S, installed via Snap. I'm trying to create a simple pod using kubectl run
that I can exec into for debugging purposes. But I keep failing.
At first, I tried this command:
kubectl run -it --rm --restart=Never busybox --image=busybox -- /bin/ash
But every time I try to run that, I get this error:
pod "busybox deleted"
pod default/busybox terminated (ContainerCannotRun)
failed to create OCI runtime control socket: stat /run/user/0/snap.microk8s: no such file or directory: unknown
Then I decided to try and run the container first, and exec into second, as two separate commands. Surprisingly, the initial pod creation actually works, a la this command:
kubectl run --image=busybox --restart=Never busybox --image=busybox --command -- tail -f /dev/null
But then when I try to exec into it using this command...
kubectl exec -it busybox -- /bin/ash
...I wind up with this error:
failed to create runc console socket: stat /run/user/0/snap.microk8s: no such file or directory: unknown
command terminated with exit code 126
Both errors only come into play once I try to connect to a running pod, and both errors reference /run/user/0/snap.microk8s
. I'm not really sure what those errors mean, though. Is that a problem with my configuration? Or am I missing some dependency? Or is the hard disk corrupt? Or something else entirely? And ultimately: how can I get this working?