Advertisement
supermaca

188-mywebserver

Apr 3rd, 2023
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 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: 5 # Number of replicas to start with
  10. strategy:
  11. type: RollingUpdate # Type of update strategy
  12. rollingUpdate: # Rolling update strategy configuration
  13. maxSurge: 1 # Maximum number of pods that can be created immediately
  14. maxUnavailable: 2 # Maximum number of old pods that can be killed immediately
  15. selector:
  16. matchLabels:
  17. app: httpd
  18. template:
  19. metadata:
  20. labels:
  21. app: httpd
  22. spec:
  23. containers:
  24. - name: myhttpd
  25. image: httpd:2
  26. ports:
  27. - containerPort: 80
  28. volumeMounts:
  29. - name: demovol # Mount the "demovol" volume
  30. mountPath: /data
  31. - name: demo-configmap-vol #(copy from line 38) Mount the "demo-configmap-vol" volume
  32. mountPath: /etc/config
  33. - name: my-secret #mount it copy name from l42
  34. mountPath: /etc/mysecrets
  35. volumes:
  36. - name: demovol # Define the "demovol" volume
  37. hostPath:
  38. path: /data
  39. type: Directory
  40. - name: demo-configmap-vol # Define the "demo-configmap-vol" volume
  41. configMap:
  42. name: demo-configmap # Mount the "demo-configmap" config map to the volume
  43. - name: my-secret
  44. secret:
  45. secretName: demo-secret # name: demo-secret en 188-secrets.yml
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement