Configuring MicroK8s to use local images
The Kubernetes orchestration framework uses container images to manage containerized applications. These images can be in a local filesystem or can be downloaded from a remote registry. The most popular container tool is Docker. The following diagram is an introduction of what Docker does:
Figure 2.17 – What Docker does
Let's suppose we have a container image built and available in the local Docker image repository. For example, here, I have the nginx1.21
image in the local Docker image repository:
Figure 2.18 – Docker images from the local Docker repository
The nginx1.21
local image is only recognized by Docker, and MicroK8s Kubernetes will not be aware of the image. This is because the MicroK8s Kubernetes cluster does not include your local Docker daemon. We can push the Docker image into the MicroK8s image cache by exporting it from the local Docker daemon using the following...