mac 部署k8s
http://kubernetes.io/docs/getting-started-guides/minikube/
启动k8s
停止k8s
打开k8s dashboard
获取所有的pods
1
| kubectl get pods --all-namespaces
|
获取所有的节点
1 2
| eval $(minikube docker-env) docker ps
|
k8s 部署mysql+wordpress
1 2 3 4 5
| tr --delete '\n' <password.txt >.strippedpassword.txt && mv .strippedpassword.txt password.txt kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/examples/mysql-wordpress-pd/local-volumes.yaml kubectl create secret generic mysql-pass --from-file=password.txt kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/examples/mysql-wordpress-pd/mysql-deployment.yaml kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/examples/mysql-wordpress-pd/wordpress-deployment.yaml
|