user-db-dep.yaml 821 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ---
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: user-db
  6. labels:
  7. name: user-db
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. name: user-db
  13. template:
  14. metadata:
  15. labels:
  16. name: user-db
  17. spec:
  18. containers:
  19. - name: user-db
  20. image: weaveworksdemos/user-db:0.3.0
  21. ports:
  22. - name: mongo
  23. containerPort: 27017
  24. securityContext:
  25. capabilities:
  26. drop:
  27. - all
  28. add:
  29. - CHOWN
  30. - SETGID
  31. - SETUID
  32. readOnlyRootFilesystem: true
  33. volumeMounts:
  34. - mountPath: /tmp
  35. name: tmp-volume
  36. volumes:
  37. - name: tmp-volume
  38. emptyDir:
  39. medium: Memory
  40. nodeSelector:
  41. beta.kubernetes.io/os: linux