Guest User

Untitled

a guest
Jun 25th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. ---
  2. apiVersion: v1
  3. kind: ConfigMap
  4. metadata:
  5. name: nginx-configmap-$NAMEVAR
  6. labels:
  7. app: nginx-deployment-$NAMEVAR
  8. data:
  9. foo.conf: |-
  10. foo: bar
  11.  
  12.  
  13. ---
  14. apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
  15. kind: Deployment
  16. metadata:
  17. name: nginx-deployment-$NAMEVAR
  18. spec:
  19. selector:
  20. matchLabels:
  21. app: nginx-deployment-$NAMEVAR
  22. replicas: 2 # tells deployment to run 2 pods matching the template
  23. template: # create pods using pod definition in this template
  24. metadata:
  25. # unlike pod-nginx.yaml, the name is not included in the meta data as a unique name is
  26. # generated from the deployment name
  27. labels:
  28. app: nginx-deployment-$NAMEVAR
  29. spec:
  30. containers:
  31. - name: nginx
  32. image: nginx:1.7.9
  33. ports:
  34. - containerPort: 80
  35. volumeMounts:
  36. - name: foo
  37. mountPath: /etc/
  38. readOnly: true
  39. volumes:
  40. - name: foo
  41. configMap:
  42. defaultMode: 0600
  43. name: nginx-configmap-$NAMEVAR
Add Comment
Please, Sign In to add comment