docs/doc/source/admintasks/kubernetes/freeing-space-in-the-local-docker-registry.rst
Juanita Balaraj 6756dfb34d Removed armada and Helm v2 from docs
Note: The index.rst file (Stx. 10.0 Release Notes) is not ready for review (Only changes related to Armada updates have been completed)
Added an additional note regarding upgrading from Stx 9.0 to 10.0
Modified Multiple topics with Armada instances
Some Armada instances had to be retained due to directory structure
Change-Id: I9aea052add62356a4e9664fe8aec1ebf0223648c
Signed-off-by: Juanita Balaraj <juanita.balaraj@windriver.com>
2024-06-12 19:07:43 +00:00

94 lines
3.7 KiB
ReStructuredText

.. hsq1558095273229
.. _freeing-space-in-the-local-docker-registry:
=======================================
Free Space in the Local Docker Registry
=======================================
You can delete images and perform garbage collection to free unused registry
space on the docker-distribution file system of the controllers.
.. rubric:: |context|
Simply deleting an image from the local Docker registry does not free the
associated space from the file system. To do so, you must also run the
:command:`registry-garbage-collect` command.
.. rubric:: |proc|
#. Identify the name of the image you want to delete.
.. code-block:: none
~(keystone_admin)]$ system registry-image-list
+------------------------------------------------------+
| Image Name |
+------------------------------------------------------+
| ghcr.io/k8snetworkplumbingwg/sriov-cni |
| docker.io/starlingx/k8s-plugins-sriov-network-device |
| docker.io/starlingx/multus |
| gcr.io/kubernetes-helm/tiller |
| k8s.gcr.io/coredns |
| k8s.gcr.io/etcd |
| k8s.gcr.io/kube-apiserver |
| k8s.gcr.io/kube-controller-manager |
| k8s.gcr.io/kube-proxy |
| k8s.gcr.io/kube-scheduler |
| k8s.gcr.io/pause |
| quay.io/calico/cni |
| quay.io/calico/kube-controllers |
| quay.io/calico/node |
+------------------------------------------------------+
#. Find tags associated with the image.
.. code-block:: none
~(keystone_admin)]$ system registry-image-tags <imageName>
#. Free file system space.
.. code-block:: none
~(keystone_admin)]$ system registry-image-delete <imageName>:<tagName>
This step only removes the registry's reference to the **image:tag**.
.. warning::
Do not delete **image:tags** that are currently being used by the
system. Deleting both the local Docker registry's **image:tags** and
the **image:tags** from the Docker cache will prevent failed deployment
pods from recovering. If this happens, you will need to manually
download the deleted image from the same source and push it back into
the local Docker registry under the same name and tag.
If you need to free space consumed by |prefix|-openstack images, you
can delete older tagged versions.
#. Free up file system space associated with the deleted/unreferenced images.
The :command:`registry-garbage-collect` command removes unreferenced
**image:tags** from the file system and frees the file system spaces
allocated to deleted/unreferenced images.
.. note::
The :command:`registry-garbage-collect` command executes background
tasks that may affect access to the docker registry. It is recommended
to wait a few minutes before executing other registry related commands.
.. code-block:: none
~(keystone_admin)]$ system registry-garbage-collect
Running docker registry garbage collect
.. note::
In rare cases the system may trigger a swact during garbage collection,
and the registry may be left in read-only mode. If this happens, run
:command:`registry-garbage-collect` again to take the registry out of
read-only mode.