Este contenido no está disponible en el idioma seleccionado.

Chapter 2. Deleting or updating Kustomize manifest resources


MicroShift supports the deletion of manifest resources in the following situations:

  • Manifest removal: Manifests can be removed when you need to completely remove a resource from the cluster.
  • Manifest upgrade: During an application upgrade, some resources might need to be removed while others are retained to preserve data.

When creating new manifests, you can use manifest resource deletion to remove or update old objects, ensuring there are no conflicts or issues.

Important

Manifest files placed in the delete subdirectories are not automatically removed and require manual deletion. Only the resources listed in the manifest files placed in the delete subdirectories are deleted.

2.1. How manifest deletion works

By default, MicroShift searches for deletion manifests in the delete subdirectories within the manifests path. When a user places a manifest in these subdirectories, MicroShift removes the manifests when the system is started. Read through the following to understand how manifests deletion works in MicroShift.

  1. Each time the system starts, before applying the manifests, MicroShift scans the following delete subdirectories within the configured manifests directory to identify the manifests that need to be deleted:

    • /usr/lib/microshift/manifests/delete
    • /usr/lib/microshift/manifests.d/delete/*
    • /etc/microshift/manifests/delete
    • /etc/microshift/manifests.d/delete/*
  2. MicroShift deletes the resources defined in the manifests found in the delete directories by running the equivalent of the kubectl delete --ignore-not-found -k command.

2.2. Use cases for manifest resource deletion

The following sections explain the use case in which the manifest resource deletion is used.

2.2.1. Removing manifests for RPM systems

Use the following procedure in the data removal scenario for RPM systems to completely delete the resource defined in the manifests.

Procedure

  1. Identify the manifest that needs to be placed in the delete subdirectories.
  2. Create the delete subdirectory in which the manifest will be placed by running the following command:

    $ sudo mkdir -p <path_of_delete_directory> 
    1
    Copy to Clipboard Toggle word wrap
    1
    Replace <path_of_delete_directory> with one of the following valid directory paths: /etc/microshift/manifests.d/delete, /etc/microshift/manifests/delete/, /usr/lib/microshift/manifests.d/delete, or /usr/lib/microshift/manifests/delete.
  3. Move the manifest file into one of the delete subdirectories under the configured manifests directory by running the following command:

    $ [sudo] mv <path_of_manifests> <path_of_delete_directory>
    Copy to Clipboard Toggle word wrap

    where: <path_of_manifests>:: Specifies the path of the manifest to be deleted, for example /etc/microshift/manifests.d/010-SOME-MANIFEST. <path_of_delete_directory>:: Specifies one of the following valid directory paths: /etc/microshift/manifests.d/delete, /etc/microshift/manifests/delete, /usr/lib/microshift/manifests.d/delete or /usr/lib/microshift/manifests/delete.

  4. Restart MicroShift by running the following command:

    $ sudo systemctl restart microshift
    Copy to Clipboard Toggle word wrap
  5. MicroShift detects and removes the resource after the manifest file is placed in the delete subdirectories.

2.2.2. Removing manifests for OSTree systems

Use the following procedure to completely delete the resource defined in the manifests.

Important

For OSTree installation, the delete subdirectories are read-only.

Procedure

  1. Identify the manifest that needs to be placed in the delete subdirectories.
  2. Package the manifest into an RPM. See Building the RPM package for the application for the procedure to package the manifest into an RPM.
  3. Add the packaged RPM to the blueprint file to install it into correct location. See Adding application RPMs to a blueprint for the procedure to add an RPM to a blueprint.

2.2.3. Upgrading manifests for RPM systems

Use the following procedure to remove some resources while retaining others to preserve data.

Procedure

  1. Identify the manifest that requires updating.
  2. Create new manifests to be applied in the manifest directories.
  3. Create new manifests for resource deletion. It is not necessary to include the spec in these manifests. See Using manifests example to create new manifests using the example.
  4. Use the procedure in "Removing manifests for RPM systems" to create delete subdirectories and place the manifests created for resource deletion in this path.

2.2.4. Upgrading manifests for OSTree systems

Use the following procedure to remove some resources while retaining others to preserve data.

Important

For OSTree systems, the delete subdirectories are read-only.

Procedure

  1. Identify the manifest that needs updating.
  2. Create a new manifest to apply in the manifest directories. See Using manifests example to create new manifests using the example.
  3. Create a new manifest for resource deletion to be placed in the delete subdirectories.
  4. Use the procedure in "Removing manifests for OSTree systems" to remove the manifests.
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat