← All text tools

Kubernetes YAML Cleaner

Strip status, managedFields, resourceVersion, uid and other cluster-generated fields from kubectl get -o yaml output so the manifest can be applied again.

  • Free
  • No sign-up
  • Works on any device

About Kubernetes YAML Cleaner

When you export a live object with kubectl get -o yaml you get the manifest plus a lot the cluster added: the whole status block, managedFields, resourceVersion, uid, generation, creationTimestamp, the last-applied-configuration annotation and, for Services, the assigned clusterIP. Re-applying that to another cluster fails or causes conflicts. This cleaner removes those fields (each group can be switched off), unwraps a List into separate documents and reports how many fields it removed, leaving the clean YAML you would write by hand.

How to use Kubernetes YAML Cleaner

  1. Paste the output of kubectl get ... -o yaml, or open the saved file.
  2. Tick the groups you want removed; status, managedFields and generated metadata are on by default.
  3. Copy the cleaned YAML and check it before running kubectl apply in the target cluster.

Why use this tool?

Also known as

Frequently asked questions

Which fields stay in the result?

Everything that is not on the removal list: kind, names, labels, the spec and any annotations you added. Defaulted spec fields are kept because they are valid input.

Are YAML comments kept in the cleaned result?

No. The YAML is parsed and written again, so comments are lost. kubectl output normally contains none.

Why remove the Service clusterIP?

The address belongs to one cluster. Keeping it would try to claim the same IP elsewhere and usually fails, so Kubernetes should assign a new one.

Is Kubernetes YAML Cleaner free?

Yes. Kubernetes YAML Cleaner on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.