Advertisement
supermaca

Untitled

Mar 21st, 2023
628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.83 KB | None | 0 0
  1. #186 config maps
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5.   name: mywebserver
  6.   labels:
  7.     app: httpd
  8. spec:
  9.   replicas:
  10.   strategy:
  11.    # don't worry about this part (will get filled later)
  12.   selector:
  13.     matchLabels:
  14.       app: httpd
  15.   template:
  16.     metadata:
  17.       labels:
  18.         app: httpd
  19.     spec:
  20.       containers:
  21.         - name: myhttpd
  22.           image: httpd:2
  23.           ports:
  24.             - containerPort: 80
  25.           volumeMounts:
  26.               - name: demovol
  27.                 mountPath: /data
  28.               - name: demo-configmap-vol #(copy from line 38)
  29.                 mountPath: /etc/config
  30.       volumes:
  31.         - name: demovol
  32.           hostPath:
  33.             path: /data
  34.             type: Directory
  35.         - name: demo-configmap-vol
  36.           configMap:
  37.             - name: demo-configmap
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement