How can I generate ConfigMap from directory without create it?
10,588
Just add --dry-run
so:
$ kubectl create configmap my-config --from-file=configuration/ -o yaml --dry-run
Source: https://kubernetes.io/docs/user-guide/kubectl/kubectl_create_configmap/
Related videos on Youtube
Author by
Stéphane Klein
Artisan, geek & citoyen. #Golang, #Python, #JS, Agile software development, Free Software, web development, Politics… I work for http://tech-angels.com
Updated on September 01, 2022Comments
-
Stéphane Klein over 1 year
How can I generate ConfigMap from directory without create it?
If I use:
$ kubectl create configmap my-config --from-file=configuration/ -o yaml apiVersion: v1 data: ...
ConfigMap yaml output is displayed but
my-config
is created on current Kubernetes project context.I would like only generate ConfigMap file, it is possible? Are there a
kubectl create
"dry" mode?Best regards,
Stéphane