You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

k8s-3nacos.yaml 1.2 kB

2 years ago
2 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. namespace: argo
  5. name: nacos-ci4s
  6. labels:
  7. app: nacos-ci4s
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. app: nacos-ci4s
  13. template:
  14. metadata:
  15. labels:
  16. app: nacos-ci4s
  17. spec:
  18. containers:
  19. - name: nacos-ci4s
  20. image: nacos/nacos-server:v2.2.0
  21. env:
  22. - name: SPRING_DATASOURCE_PLATFORM
  23. value: mysql
  24. - name: MODE
  25. value: standalone
  26. - name: MYSQL_SERVICE_HOST
  27. value: mysql.argo.svc
  28. - name: MYSQL_SERVICE_PORT
  29. value: "3306"
  30. - name: MYSQL_SERVICE_DB_NAME
  31. value: nacos-ci4s-config
  32. - name: MYSQL_SERVICE_USER
  33. value: root
  34. - name: MYSQL_SERVICE_PASSWORD
  35. value: qazxc123456.
  36. ports:
  37. - containerPort: 8848
  38. - containerPort: 9848
  39. restartPolicy: Always
  40. ---
  41. apiVersion: v1
  42. kind: Service
  43. metadata:
  44. namespace: argo
  45. name: nacos-ci4s
  46. labels:
  47. app: nacos-ci4s
  48. spec:
  49. type: NodePort
  50. selector:
  51. app: nacos-ci4s
  52. ports:
  53. - port: 8848
  54. targetPort: 8848
  55. nodePort: 31203
  56. name: web
  57. - port: 9848
  58. targetPort: 9848
  59. nodePort: 31204
  60. name: podsa