|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * post_installation_configuration/machine-configuration-tasks.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="machineconfig-garbage-collect-viewing_{context}"] |
| 7 | += Viewing rendered machine configs |
| 8 | + |
| 9 | +You can view a list of rendered machine configs by using the `oc adm prune renderedmachineconfigs` command with the `list` subcommand. |
| 10 | + |
| 11 | +For example, the command in the following procedure would list all rendered machine configs for the `worker` machine config pool. |
| 12 | + |
| 13 | +.Procedure |
| 14 | + |
| 15 | +* Optional: List the rendered machine configs by using the following command: |
| 16 | ++ |
| 17 | +[source,terminal] |
| 18 | +---- |
| 19 | +$ oc adm prune renderedmachineconfigs list --in-use=false --pool-name=worker |
| 20 | +---- |
| 21 | ++ |
| 22 | +-- |
| 23 | +where: |
| 24 | +
|
| 25 | +list:: Displays a list of rendered machine configs in your cluster. |
| 26 | + |
| 27 | +`--in-use`:: Optional: Specifies whether to display only the used machine configs or all machine configs from the specified pool. If `true`, the output lists the rendered machine configs that are being used by a machine config pool. If `false`, the output lists all rendered machine configs in the cluster. The default value is `false`. |
| 28 | + |
| 29 | +`--pool-name`:: Optional: Specifies the machine config pool from which to display the machine configs. |
| 30 | +-- |
| 31 | ++ |
| 32 | +.Example output |
| 33 | +[source,terminal] |
| 34 | +---- |
| 35 | +worker |
| 36 | +status: rendered-worker-ae115e2b5e6ae05e0e6e5d62c7d0dd81 |
| 37 | +spec: rendered-worker-ae115e2b5e6ae05e0e6e5d62c7d0dd81 |
| 38 | +---- |
| 39 | + |
| 40 | +* List the rendered machine configs that you can remove automatically by running the following command. Any rendered machine config marked with `as it's currently in use` in the command output is not removed. |
| 41 | ++ |
| 42 | +[source,terminal] |
| 43 | +---- |
| 44 | +$ oc adm prune renderedmachineconfigs --pool-name=worker |
| 45 | +---- |
| 46 | ++ |
| 47 | +The command runs in dry-run mode, and no machine configs are removed. |
| 48 | ++ |
| 49 | +-- |
| 50 | +where: |
| 51 | +
|
| 52 | +`--pool-name`:: Optional: Displays the machine configs in the specified machine config pool. |
| 53 | +-- |
| 54 | ++ |
| 55 | +.Example output |
| 56 | +[source,terminal] |
| 57 | +---- |
| 58 | +Dry run enabled - no modifications will be made. Add --confirm to remove rendered machine configs. |
| 59 | +DRY RUN: Deleted rendered MachineConfig rendered-worker-23d7322831a57f02998e7e1600a0865f |
| 60 | +DRY RUN: Deleted rendered MachineConfig rendered-worker-fc94397dc7c43808c7014683c208956e |
| 61 | +DRY RUN: Skipping deletion of rendered MachineConfig rendered-worker-ad5a3cad36303c363cf458ab0524e7c0 as it's currently in use |
| 62 | +---- |
0 commit comments