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.5 kB

1 year ago
1 year ago
1 year ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. - containerPort: 9849
  40. initContainers:
  41. - name: init-mydb
  42. image: busybox:1.31
  43. command: [ 'sh', '-c', 'nc -zv mysql.argo.svc 3306' ]
  44. restartPolicy: Always
  45. ---
  46. apiVersion: v1
  47. kind: Service
  48. metadata:
  49. namespace: argo
  50. name: nacos-ci4s
  51. labels:
  52. app: nacos-ci4s
  53. spec:
  54. type: NodePort
  55. selector:
  56. app: nacos-ci4s
  57. ports:
  58. - port: 8848
  59. targetPort: 8848
  60. nodePort: 31203
  61. name: web
  62. - port: 9848
  63. targetPort: 9848
  64. nodePort: 32203
  65. name: podsa
  66. - port: 9849
  67. targetPort: 9849
  68. nodePort: 32204
  69. name: tcp-9849