deploy.yml 966 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. ---
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: go-admin-ui
  6. labels:
  7. app: go-admin-ui
  8. service: go-admim-ui
  9. spec:
  10. ports:
  11. - port: 80
  12. name: http
  13. protocol: TCP
  14. selector:
  15. app: go-admin-ui
  16. ---
  17. apiVersion: apps/v1
  18. kind: Deployment
  19. metadata:
  20. name: go-admin-ui-v1
  21. labels:
  22. app: go-admin-ui
  23. version: v1
  24. spec:
  25. replicas: 1
  26. selector:
  27. matchLabels:
  28. app: go-admin-ui
  29. version: v1
  30. template:
  31. metadata:
  32. labels:
  33. app: go-admin-ui
  34. version: v1
  35. spec:
  36. containers:
  37. - name: go-admin-ui
  38. image: ${IMAGE}
  39. imagePullPolicy: IfNotPresent
  40. ports:
  41. - containerPort: 80
  42. volumeMounts:
  43. - name: frontendconf
  44. mountPath: /etc/nginx/conf.d/default.conf
  45. subPath: default.conf
  46. readOnly: true
  47. volumes:
  48. - name: frontendconf
  49. configMap:
  50. name: nginx-frontend
  51. ---