Microk8s: How to increase the Microk8s Built-in Registry default limit of 20GB

Created on 10 Jun 2020  路  6Comments  路  Source: ubuntu/microk8s

With Microk8s latest version, how can we change the built-in registry default size limit of 20GB?

My colleague has posted to the forum with the same question.

If someone knowledgeable could please reply quickly here, or on the forum question, be very grateful. It's impacting our production env. so any pointers would help us a lot. We've been following the official docs here but it doesn't offer an answer to this question.

Thank you.

All 6 comments

We noticed that in theory master branch seems to have support for this already:
microk8s.enable registry:size=30Gi
https://github.com/ubuntu/microk8s/pull/1024
But this command does not seem to do anything on latest snap (1.18). Could it be a result of the failing CI snap build here?

very grateful for any support!

@bml1g12 @kinowarrior could you please get MIcroK8s from the latest stable channel?

sudo snap install microk8s --classic --channel=latest/stable

The size argument is available there.

@ktsakalozos - Thanks for your reply. Alas, we are already on latest/stable and have refreshed snap. The command microk8s.enable registry:size=30Gi didn't do anything (kubectl get pv -A just displays 20GB).

Found an original issue for this here, where there were different options considered. Please can you confirm the right command to use. In other words, what were you referring to when you stated The size argument is available there.. Thanks again, apologies for any oversight here.

You have the command right: microk8s.enable registry:size=30Gi

Could you please make sure the PVC is recreated with the new specs? This may mean you disable and re-enable the registry and the storage addons. If this is not possible, you may want to delete the PVC and re-enable the registry so the registry manifest is re-applied.

Excellent thanks very much, seems we needed to update from v1.18.3 rev 1422 to v1.18.3 rev 1443 (sudo snap refresh --channel latest/stable microk8s)

(detector) ben@ben-asus /media/DATA/gym_ai/EntranceCounterLabelingTool/benchmarkalgorithms (develop) $ kubectl get pv -A 
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                               STORAGECLASS        REASON   AGE
pvc-83928ee7-d7ac-4d37-99e8-6425fbaf31bc   30Gi       RWX            Delete           Bound    container-registry/registry-claim   microk8s-hostpath            6m3s
(detector) ben@ben-asus /media/DATA/gym_ai/EntranceCounterLabelingTool/benchmarkalgorithms (develop) $ kubectl get pvc -A
NAMESPACE            NAME             STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS        AGE
container-registry   registry-claim   Bound    pvc-83928ee7-d7ac-4d37-99e8-6425fbaf31bc   30Gi       RWX            microk8s-hostpath   6m5s

Thank you @ktsakalozos - shall close this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xrpn picture xrpn  路  4Comments

avarf picture avarf  路  5Comments

carmine picture carmine  路  4Comments

linxuyalun picture linxuyalun  路  3Comments

ceefour picture ceefour  路  3Comments