K8S部署Mysql.yaml
apiVersion: apps/v1kind: Deploymentmetadata:name: mysqlnamespace: developmentspec:replicas: 2template:metadata:labels:name: mysqlspec:containers:...
·
apiVersion: apps/v1 kind: Deployment metadata: name: mysql namespace: development spec: replicas: 2 template: metadata: labels: name: mysql spec: containers: - name: mysql image: mysql imagePullPolicy: Always ports: - containerPort: 3306 environment: MYSQL_ROOT_PASSWORD:123456 --- apiVersion: v1 kind: Service metadata: name: mysql namespace: development spec: type: NodePort ports: - port: 3306 nodePort: 10306 targetPort: 3306 selector: name: mysql 访问数据库:IP+10306端口
更多推荐
已为社区贡献3条内容
所有评论(0)