DEV Community

Cover image for Get a specific apiVersion manifest from k8s

Get a specific apiVersion manifest from k8s

Roman Geraskin on March 19, 2024

TL;DR To get a manifest from k8s in any supported API version you can use an extended kubectl get notation like kubectl get deployments...
Collapse
 
bcouetil profile image
Benoit COUETIL 💫

Welcome, and thank you for sharing !

That is a nice trick, I did not know about it.

What use case made you discover this ? Why would you not need the latest version ?

Collapse
 
rgeraskin profile image
Roman Geraskin

I don't remember, it was kind of incidental catch)

But you can still have some situations where this trick can be useful. E.g. you have some manifest deployed in a test cluster and you want to copy it to stage. And k8s version in test is newer than stage.