Difference between revisions of "EnvFrom:"

From wikieduonline
Jump to navigation Jump to search
(Created page with " Official example: <ref>https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/</ref> <pre> apiVersion: v1 kind: Pod metadata: name: dapi...")
 
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{lc}}
  
 +
Official example: <ref>https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/</ref>
  
Official example: <ref>https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/</ref>
+
apiVersion: v1
<pre>
+
[[kind: Pod]]
apiVersion: v1
+
metadata:
 
+
  name: dapi-test-pod
kind: Pod
+
spec:
 
+
   [[containers:]]
metadata:
 
 
 
  name: dapi-test-pod
 
 
 
spec:
 
    
 
  containers:
 
 
 
 
     - name: test-container
 
     - name: test-container
 
    
 
    
Line 22: Line 16:
 
    
 
    
 
       envFrom:
 
       envFrom:
 
+
       - [[configMapRef]]:
       - configMapRef:
 
 
    
 
    
 
           name: special-config
 
           name: special-config
 
+
  restartPolicy: Never
  restartPolicy: Never
+
 
 
+
== Related ==
</pre>
+
* <code>[[secretRef:]]</code>
 +
* <code>[[env:]]</code>
 +
 
 +
== See also ==
 +
* {{Kubernetes secrets}}
 +
* {{ConfigMap}}
 +
 
 +
[[Category:Kubernetes]]

Latest revision as of 14:56, 13 January 2023

Official example: [1]

apiVersion: v1
kind: Pod
metadata:
  name: dapi-test-pod
spec:
 containers:
   - name: test-container
 
     image: k8s.gcr.io/busybox
 
     command: [ "/bin/sh", "-c", "env" ]
 
     envFrom:
     - configMapRef:
 
         name: special-config
  restartPolicy: Never

Related[edit]

See also[edit]

  • https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/
  • Advertising: