Difference between revisions of "Kubectl create configmap"

From wikieduonline
Jump to navigation Jump to search
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Draft}}
 
 
{{lowercase}}
 
{{lowercase}}
 +
* https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/
 +
[[kubectl create]] configmap YOUR-CONFIMAP-NAME YOUR-DATA-SOURCE
  
 +
== Creating from command line ==
 +
kubectl create configmap yourspecial-config [[--from-literal]]=special.how=very --from-literal=special.type=charm
 +
 +
apiVersion: v1
 +
kind: ConfigMap
 +
metadata:
 +
  creationTimestamp: 2016-02-18T19:14:38Z
 +
  name: special-config
 +
  namespace: default
 +
  resourceVersion: "651"
 +
  uid: dadce046-d673-11e5-8cd0-68f728db1985
 +
[[data:]]
 +
  special.how: very
 +
  special.type: charm
 +
 +
== Related ==
 +
[[kind: ConfigMap]]
 +
 +
[[kubectl apply -f]] [[/path/to/your/aws-ingress-nginx-config.yaml]]
 +
configmap/nginx-config created
  
 
== See also ==
 
== See also ==
 
* {{ConfigMaps}}
 
* {{ConfigMaps}}
* {{kubectl}}
+
* {{kubectl create}}
  
 
[[Category:K8s]]
 
[[Category:K8s]]

Latest revision as of 07:55, 9 September 2022

kubectl create configmap YOUR-CONFIMAP-NAME YOUR-DATA-SOURCE

Creating from command line[edit]

kubectl create configmap yourspecial-config --from-literal=special.how=very --from-literal=special.type=charm
apiVersion: v1
kind: ConfigMap
metadata:
  creationTimestamp: 2016-02-18T19:14:38Z
  name: special-config
  namespace: default
  resourceVersion: "651"
  uid: dadce046-d673-11e5-8cd0-68f728db1985
data:
  special.how: very
  special.type: charm

Related[edit]

kind: ConfigMap
kubectl apply -f /path/to/your/aws-ingress-nginx-config.yaml
configmap/nginx-config created

See also[edit]

Advertising: