How to use a local registry

I’ve managed to use the my local images without having to do the docker save and microk8s ctr image import commands.

Basically what I had to do was point my docker daemon at the containerd sock that microk8s uses, make sure it uses the same containerd namespace as microk8s & enable the containerd-snappshotter feature.

Here’s what that looks like in the daemon.json file (/etc/docker/daemon.json on my linux machine)

{
	"features": {
		"containerd-snapshotter": true
	},
	"containerd": "/var/snap/microk8s/common/run/containerd.sock",
	"containerd-namespace": "k8s.io"
}
1 Like