Este conteúdo não está disponível no idioma selecionado.

Chapter 2. Deleting or updating Kustomize manifest resources


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

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 node.
  • Manifest upgrade: During an application upgrade, some resources might need to be removed while others are retained to preserve data.
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.1.1. Use cases for manifest resource deletion

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

2.1.2. Removing manifests for RPM systems

To remove a resource on RPM-based MicroShift systems, move the manifest into a delete subdirectory and restart MicroShift so the resource is deleted.

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>

    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>

    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
  5. MicroShift detects and removes the resource after the manifest file is placed in the delete subdirectories.

2.1.3. Removing manifests for OSTree systems

On OSTree-based MicroShift systems, you can remove a resource by packaging the manifest in an RPM, adding it to a blueprint, and letting MicroShift process the delete directory.

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.1.4. Upgrading manifests for RPM systems

To update resources while preserving data on RPM-based MicroShift systems, you can create new manifests for changes and deletions, and then move the deletion manifests into a delete subdirectory.

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.1.5. Upgrading manifests for OSTree systems

To update resources while preserving data on OSTree-based MicroShift systems, you can create new manifests for changes and deletions and use the OSTree removal procedure for the delete directory.

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.
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2026 Red Hat
Voltar ao topo