Ubuntu 26.04

MicroK8s : Enable Registry2026/05/20

 

To enable MicroK8s built-in Registry, Configure like follows.

[1] Enable built-in Registry on primary Node.
After enabling, [kube-proxy] listens on [0.0.0.0:32000].
# enable registry with backend storage size 30G
# default size is 20G if it's not specified

root@dlp:~#
microk8s enable registry:size=30Gi

Infer repository core for addon registry
Infer repository core for addon hostpath-storage
Enabling default storage class.
WARNING: Hostpath storage is not suitable for production environments.
         A hostpath volume can grow beyond the size limit set in the volume claim manifest.

sudo: preserving the entire environment is not supported, '-E' is ignored
deployment.apps/hostpath-provisioner created
storageclass.storage.k8s.io/microk8s-hostpath created
serviceaccount/microk8s-hostpath created
clusterrole.rbac.authorization.k8s.io/microk8s-hostpath created
clusterrolebinding.rbac.authorization.k8s.io/microk8s-hostpath created
Storage will be available soon.
WARNING: This style of specifying size is deprecated. Use newer --size argument instead.
The registry will be created with the size of 30Gi.
Default storage class will be used.
namespace/container-registry created
persistentvolumeclaim/registry-claim created
deployment.apps/registry created
service/registry created
configmap/local-registry-hosting configured

# [registry] pod starts

root@dlp:~#
microk8s kubectl get pods -n container-registry

NAME                        READY   STATUS    RESTARTS   AGE
registry-67fdd8b5b8-d7vxl   1/1     Running   0          24s
[2] After enabling Registry, it's possible to use it with common operation.
root@dlp:~#
podman images

REPOSITORY                TAG         IMAGE ID      CREATED      SIZE
docker.io/library/ubuntu  latest      30ba44506a6d  4 weeks ago  111 MB

# tag and push

root@dlp:~#
podman tag 30ba44506a6d localhost:32000/ubuntu:registry

root@dlp:~#
podman push localhost:32000/ubuntu:registry --tls-verify=false

Getting image source signatures
Copying blob 0c3db79307ab done   |
Copying blob f421a7e99ead done   |
Copying config 30ba44506a done   |
Writing manifest to image destination

root@dlp:~#
podman images

REPOSITORY                TAG         IMAGE ID      CREATED      SIZE
localhost:32000/ubuntu    registry    30ba44506a6d  4 weeks ago  111 MB
docker.io/library/ubuntu  latest      30ba44506a6d  4 weeks ago  111 MB
Matched Content