kubectl create yml config doesn't create with headers/generator v1

3/29/2018

I am trying to create a config map yml file from a file:

kubectl create configmap my-config --from-file=my-file.json -o yaml --dry-run

I even try with generator:

kubectl create configmap my-config --from-file=my-file.json --generator="configmap/v1" -o yaml --dry-run

but the output, doesn't contain apiVersion / kind but just data / metadata.

-- L.joe
kubectl
kubernetes

1 Answer

3/29/2018

solved by installing kubectl v1.9.2 rather than older version I had.

-- L.joe
Source: StackOverflow