apiVersion: apps/v1 kind: Deployment metadata: namespace: argo name: nacos-ci4s labels: app: nacos-ci4s spec: replicas: 1 selector: matchLabels: app: nacos-ci4s template: metadata: labels: app: nacos-ci4s spec: containers: - name: nacos-ci4s image: 172.20.32.187/ci4s/nacos-server:v2.2.0 env: - name: SPRING_DATASOURCE_PLATFORM value: mysql - name: MODE value: standalone - name: MYSQL_SERVICE_HOST value: mysql.argo.svc - name: MYSQL_SERVICE_PORT value: "3306" - name: MYSQL_SERVICE_DB_NAME value: nacos-ci4s-config - name: MYSQL_SERVICE_USER value: root - name: MYSQL_SERVICE_PASSWORD value: qazxc123456. ports: - containerPort: 8848 - containerPort: 9848 - containerPort: 9849 initContainers: - name: init-mydb-check image: 172.20.32.187/ci4s/busybox:1.31 command: [ 'sh', '-c', 'nc -zv mysql.argo.svc 3306' ] restartPolicy: Always --- apiVersion: v1 kind: Service metadata: namespace: argo name: nacos-ci4s labels: app: nacos-ci4s spec: type: NodePort selector: app: nacos-ci4s ports: - port: 8848 targetPort: 8848 nodePort: 31203 name: web - port: 9848 targetPort: 9848 nodePort: 32203 name: podsa - port: 9849 targetPort: 9849 nodePort: 32204 name: tcp-9849