Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I `kubectl explain` the entire structure of a custom resource?

I have a CR in the cluster. I know that there is a filed specialField somewhere in this CRD. I do not know where it is. Right now I am randomly exploring the CRD using kubectl explain path.to.some.filed to try to fiend the filed. Is there some way to explain the entire nested structure using kubectl explain?

What I am looking for is something like this

kubectl explain-magic my-crd

my-crd
 a
  b
   c
 other
  field 
 more
  fields
 very 
  nested
   field

or as an alternative

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

my-crd
a
a.b
a.b.c
other
other.field
more
more.fields
very
very.nested
very.nested.field

>Solution :

Add the –recursive flag to display all of the fields at once without descriptions. Information about each field is
retrieved from the server in OpenAPI format.

from kubectl help explain.

Just do: kubectl explain --recursive my-crd

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading