How to create k8s configMap?
Jump to turn (9)
- 1How to create k8s configMap?
- 2so, how to use this configMap from other pod?
- 3how about deployment yaml?
- 4thank you! i did it
- 5i'm trying to apply DataDog log collection. and my application server is spring
- 6where should apply the "logs\enabled" property in datadog.yaml
- 7Is datadog.yml file equivalant to datadog daemonSet configuration file?
- 8i have 1 daemonSet for datadog-agent, and also deployments for datadog-agent-clu
- 9how to create custom datadog.yaml and apply it
- User
How to create k8s configMap?
- Assistant
To create a Kubernetes ConfigMap, you can use the
kubectl create configmapcommand. The syntax is as follows:codekubectl create configmap <configmap-name> --from-literal=<key>=<value>You can also create a ConfigMap from a file or directory using the
--from-fileor--from-env-fileoptions, respectively.For example, to create a ConfigMap named
my-configfrom a file namedconfig.txt, you can use the following command:codekubectl create configmap my-config --from-file=config.txtAlternatively, you can create a ConfigMap using
YAMLconfig file which would look like this:code