安装启动:

1
2
3
4
5
6
7
8
9
10
11
# 安装 etcd 和 Kubernetes 软件(会自动安装 Docker 软件)
yum install -y etcd kubernetes

# 启动
systemctl start etcd
systemctl start docker
systemctl start kube-apiserver
systemctl start kube-controller-manager
systemctl start kube-scheduler
systemctl start kubelet
systemctl start kube-proxy

常用命令

1
2
3
4
5
6
7
发布:kubectl create -f mysql-rc.yaml
查看刚刚创建的 RC:kubectl get rc
查看 Pod:kubectl get pods
删除创建的 RC:kubectl delete -f mysql-rc.yaml
查看 pods 详情:kubectl describe pod mysql
创建 service:kubectl create -f mysql-svc.yaml
查看 service:kubectl get svc