Logout from your workstation session and login again.
Useful commands
Get kubeconfig
microk8s.config > $HOME/.kube/config
Reset cluster
microk8s reset --destroy-storage
References
Built-in Registry
Push
Pushing to this insecure registry may fail in some versions of Docker unless the daemon is explicitly configured to trust this registry. To address this we need to edit /etc/docker/daemon.json and add:
/etc/docker/daemon.json
{
"insecure-registries" : ["localhost:32000"]
}
Then restart docker.
sudo systemctl restart docker
Enable registry, build and push image.
microk8s enable registry #20Gi registry
#microk8s enable registry:size=40Gi
# Build image
docker build . -t localhost:32000/myimage:registry
# Or tag an existing image
#docker tag 1fe3d8f47868 localhost:32000/myimage:registry
docker push localhost:32000/myimage:registry