deployment.yaml 691 B

1234567891011121314151617181920212223242526272829303132
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: myapp
  5. namespace: fsprod
  6. labels:
  7. app: myapp
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. name: myapp
  13. template:
  14. metadata:
  15. labels:
  16. name: myapp
  17. spec:
  18. containers:
  19. - name: myapp
  20. image: nexusip/fsserver/imagename
  21. imagePullPolicy: Always
  22. securityContext:
  23. runAsUser: 0 #设置以ROOT用户运行容器
  24. privileged: true
  25. ports:
  26. - containerPort: 80
  27. imagePullSecrets:
  28. - name: fsregsecret
  29. volumes:
  30. - name: localtime
  31. hostPath:
  32. path: /etc/localtime