Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #186 config maps
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: mywebserver
- labels:
- app: httpd
- spec:
- replicas: 5 # Number of replicas to start with
- strategy:
- type: RollingUpdate # Type of update strategy
- rollingUpdate: # Rolling update strategy configuration
- maxSurge: 1 # Maximum number of pods that can be created immediately
- maxUnavailable: 2 # Maximum number of old pods that can be killed immediately
- selector:
- matchLabels:
- app: httpd
- template:
- metadata:
- labels:
- app: httpd
- spec:
- containers:
- - name: myhttpd
- image: httpd:2
- ports:
- - containerPort: 80
- volumeMounts:
- - name: demovol # Mount the "demovol" volume
- mountPath: /data
- - name: demo-configmap-vol #(copy from line 38) Mount the "demo-configmap-vol" volume
- mountPath: /etc/config
- - name: my-secret #mount it copy name from l42
- mountPath: /etc/mysecrets
- volumes:
- - name: demovol # Define the "demovol" volume
- hostPath:
- path: /data
- type: Directory
- - name: demo-configmap-vol # Define the "demo-configmap-vol" volume
- configMap:
- name: demo-configmap # Mount the "demo-configmap" config map to the volume
- - name: my-secret
- secret:
- secretName: demo-secret # name: demo-secret en 188-secrets.yml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement