[root@master ~]# helm install stable/mysql -n bdqn-mysql --set mysqlRootPassword=123.com #创建实例,并设置密码 [root@master ~]# kubectl get pod NAME READY STATUS RESTARTS AGE bdqn-mysql-mysql-7b89c7b99-kg4wf 0/1 Init:0/1 0 17s #正在初始化 [root@master ~]# kubectl get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE bdqn-mysql-mysql Bound mysqlpv 8Gi RWO 48s #还需要一个小镜像 docker pull busybox:1.25.0 [root@master ~]# kubectl get pod NAME READY STATUS RESTARTS AGE bdqn-mysql-mysql-7b89c7b99-kg4wf 1/1 Running 0 2m10s [root@master ~]# kubectl get deployments. NAME READY UP-TO-DATE AVAILABLE AGE bdqn-mysql-mysql 1/1 1 1 2m13s