码迷,mamicode.com
首页 > 其他好文 > 详细

nignx-configmap

时间:2020-06-14 18:52:22      阅读:69      评论:0      收藏:0      [点我收藏+]

标签:spec   name   cas   ntp   conf   contain   key   vol   label   

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
        name: ngnx
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80
        volumeMounts:
        - name: config-volume
          mountPath: /etc/nginx/conf.d/default1.conf
          subPath: default1.conf
        - name: config-volume
          mountPath: /etc/nginx/conf.d/defualt2.conf
          subPath: default2.conf
        - name: config-volume2
          mountPath: /etc/nginx/conf.d/conf.d/default3.conf
          subPath: default3.conf
      volumes:
      - name: config-volume
        configMap:
          name: nginx-configmap1
          items:
          - key: default1.conf
            path: default1.conf
          - key: default2.conf
            path: default2.conf
      - name: config-volume2
        configMap:
          name: nginx-configmap2
          items:
          - key: default1.conf
            path: default3.conf

 

nignx-configmap

标签:spec   name   cas   ntp   conf   contain   key   vol   label   

原文地址:https://www.cnblogs.com/director/p/13125955.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!