其他分享
首页 > 其他分享> > Volume

Volume

作者:互联网

目录

Overview

Pod Volume with ConfigMap

apiVersion: v1
kind: Pod
metadata:
  name: my-pod-3
  namespace: matt
spec:
  containers:
    - name: my-pod-3
      image: busybox
#      command: ["/bin/sh", "-c", "sleep 3600"]
      command:
        - "/bin/sh"
        - "-c"
        - "sleep 3600"
      volumeMounts:
        - name: vol-config
          mountPath: /etc/config
  volumes:
    - name: vol-config
      configMap:
        name: my-cm-3

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: my-cm-3
  namespace: matt
data:
  hello: world_1 # hello is file name, world_1 is value.

标签:ConfigMap,name,my,Volume,pod,config
来源: https://www.cnblogs.com/abc608088/p/16557724.html