Setup edge cluster local image registry for MicroK8s
Note: Skip this section if using remote image registry. Enable the container registry and configure Docker to tolerate the insecure registry.
Procedure
Enable the container registry:
microk8s.enable registry export REGISTRY_ENDPOINT=localhost:32000 export REGISTRY_IP_ENDPOINT=$(kubectl get service registry -n container-registry | grep registry | awk '{print $3;}'):5000Install Docker (if not already installed,
docker --versionto check):curl -fsSL get.docker.com | shInstall jq (if not already installed):
apt-get -y install jqDefine this registry as insecure to Docker. Create or add to
/etc/docker/daemon.json:echo "{ \"insecure-registries\": [ \"$REGISTRY_ENDPOINT\", \"$REGISTRY_IP_ENDPOINT\" ] }" >> /etc/docker/daemon.jsonRestart Docker to pick up the change:
systemctl restart docker