Install Docker and microk8s on the same server

Hi,

For dev work, sometimes I only need Docker to run docker builld docker run and maybe docker-compose. When testing those docker images, I don’t need microk8s at all.

Is it OK to install docker and docker-compose on the same physical machine which already has microk8s?

yes @TristanStanic. MicroK8s uses containerd instead of Docker. But if you want the images to be available to MicroK8s, you will need to follow this. Using the built-in registry or this https://microk8s.io/docs/registry-images

@balchua1 Oh cool thanks very much. This is good news. I was concerned that Docker would somehow alter the network config of the machine that would interfer with microk8s.

Also thanks for the suggestion about the built-in registry. I’d would definitely try that out. So far, I just upload the images to hub.docker.io.

And how about the JDK? Any impact on microk8s if I install multiple JDK?

MicroK8s does not have any dependency on Java. You should be be able to install any JDK/JRE you want.

Whilst docker and microk8s can cohabit on the same server (for dev purposes) I am seeing that activities in docker can upset microk8s’ accessibility, particularly when docker compose deployments take place.

Essentially if you have microk8s running a few deployments (nothing major) and you perform a docker compose up -d, the k8s kublet is unresponsive for a few seconds. When it returns I can see that pods, services etc have been restarted because the k8s node has problems.

If I take a look at kubectl get events I can see the k8s node ‘apparently’ had capacity issues with invalid capacity 0 on image filesystem. and kubectl describe node confirms this.

I do not have disk space capacity issues and the process of bringing up even the smallest of containers in docker (not microk8s) seems to kick microk8s in to an unresponsive state.

From what I can see I have not reached any capacity ceilings (ie hitting max number of pods for the node) - but I notice a modest spike in IOPS on my m2 disk on which k8s and docker are running. It has an ext4 filesystem which I believe is the current accepted filesystem for docker.

Not sure if anyone has seen this and confirmed if the spike in I/O is sufficient to make k8s unresponsive - but the docker compose deployments take less than 3 seconds for me, and yet this seems enough for k8s to c**p the bed.

Appreciate any thoughts.