deploy.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ---
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: go-admin
  6. labels:
  7. app: go-admin
  8. service: go-admin
  9. spec:
  10. ports:
  11. - port: 8000
  12. name: http
  13. protocol: TCP
  14. selector:
  15. app: go-admin
  16. ---
  17. apiVersion: apps/v1
  18. kind: Deployment
  19. metadata:
  20. name: go-admin-v1
  21. labels:
  22. app: go-admin
  23. version: v1
  24. spec:
  25. replicas: 1
  26. selector:
  27. matchLabels:
  28. app: go-admin
  29. version: v1
  30. template:
  31. metadata:
  32. labels:
  33. app: go-admin
  34. version: v1
  35. spec:
  36. containers:
  37. - name: go-admin
  38. image: registry.cn-shanghai.aliyuncs.com/go-admin-team/go-admin
  39. imagePullPolicy: IfNotPresent
  40. ports:
  41. - containerPort: 8000
  42. volumeMounts:
  43. - name: go-admin
  44. mountPath: /temp
  45. - name: go-admin
  46. mountPath: /static
  47. - name: go-admin-config
  48. mountPath: /config/
  49. readOnly: true
  50. volumes:
  51. - name: go-admin
  52. persistentVolumeClaim:
  53. claimName: go-admin
  54. - name: go-admin-config
  55. configMap:
  56. name: settings-admin
  57. ---