多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## deployment.yml ``` apiVersion: v1 kind: ReplicationController metadata: name: mysql-rc labels: name: mysql-rc spec: replicas: 1 selector: name: mysql-pod template: metadata: labels: name: mysql-pod spec: containers: - name: mysql image: mysql:8.0.24 imagePullPolicy: IfNotPresent ports: - containerPort: 3306 env: - name: MYSQL_ROOT_PASSWORD value: "123Ad123Ad" ``` ### service.yml ``` apiVersion: v1 kind: Service metadata: name: mysql-svc labels: name: mysql-svc spec: type: LoadBalancer ports: - port: 7000 protocol: TCP targetPort: 3306 selector: name: mysql-pod ```