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
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/