一、先部署mariadb




二、在远程登录工具上进行登录测试,端口号为30117,用户为 root,密码为123

三、使用测试工具:
[root@k8s-master aaa]# kubectl exec -it pods/cluster-test0-58689d5d5d-7c49r -- bash

四、部署wordpress


[root@k8s-master aaa]# kubectl create -f wordpress-deployment.yaml
deployment.apps/wordpress-deployment created
[root@k8s-master aaa]# kubectl get pod
NAME READY STATUS RESTARTS AGE
cluster-test0-58689d5d5d-7c49r 1/1 Running 5 (9m35s ago) 3d3h
haha-965670/1 ImagePullBackO0 3d3h
mariadb-deployment-5bf6d9f98c-9mddb 1/1 Running 0 54m
wordpress-7695bd58f4-42hx2 1/1 Running 1 (70m ago) 3d
wordpress-7695bd58f4-dqp8q 1/1 Running 1 (70m ago) 3d
wordpress-7695bd58f4-v8j7l 1/1 Running 1 (70m ago) 3d
wordpress-deployment-555685954b-52lbs 1/1 Running 0 15s
wordpress-deployment-555685954b-d8qqz 1/1 Running 0 15s
[root@k8s-master aaa]# vim wordpress-service.yaml
apiVersion: v1
kind: Service


五、浏览器访问本机地址:192.168.2.66:32000
