Debian 11 Bullseye
Sponsored Link

MicroK8s : Enable Registry2021/08/30

 
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
# possible to specify the size on MicroK8s 1.18.3 or later

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

Addon storage is already enabled.
Enabling the private registry
Applying registry manifest
namespace/container-registry created
persistentvolumeclaim/registry-claim created
deployment.apps/registry created
service/registry created
configmap/local-registry-hosting configured
The registry is enabled
The size of the persistent volume is 30Gi

# [registry] pod starts

root@dlp:~#
microk8s kubectl get pods -A

NAMESPACE            NAME                                         READY   STATUS              RESTARTS   AGE
kube-system          metrics-server-8bbfb4bdb-26477               1/1     Running             0          18m
kube-system          calico-node-swq7c                            1/1     Running             0          26m
kube-system          calico-kube-controllers-f7868dd95-sznzp      1/1     Running             0          51m
kube-system          dashboard-metrics-scraper-78d7698477-ts455   1/1     Running             0          17m
kube-system          kubernetes-dashboard-85fd7f45cb-vg68g        1/1     Running             0          17m
kube-system          coredns-7f9c69c78c-wvhn6                     1/1     Running             0          17m
kube-system          hostpath-provisioner-5c65fbdb4f-lbqc5        1/1     Running             0          8m41s
container-registry   registry-9b57d9df8-jztbr                     0/1     ContainerCreating   0          14s
[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/debian  latest  fe3c5de03486  13 days ago  129 MB

# tag and push

root@dlp:~#
podman tag fe3c5de03486 localhost:32000/debian:my-registry

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

Getting image source signatures
Copying blob a881cfa23a78 done
Copying config fe3c5de034 done
Writing manifest to image destination
Storing signatures

root@dlp:~#
podman images

REPOSITORY                TAG          IMAGE ID      CREATED      SIZE
docker.io/library/debian  latest       fe3c5de03486  13 days ago  129 MB
localhost:32000/debian    my-registry  fe3c5de03486  13 days ago  129 MB
Matched Content