试用minikube

centos: CentOS Linux release 7.6.1810 (Core)
docker:Docker version 19.03.1, build 74b1e89
minikube: v1.3.1

一、安装docker

# yum 包更新
[root@centos7 ~]# yum update

# 卸载旧版本 Docker
[root@centos7 ~]# yum remove docker docker-common docker-selinux docker-engine

# 安装软件包
[root@centos7 ~]# yum install -y yum-utils device-mapper-persistent-data lvm2

# 添加 Docker yum源
[root@centos7 ~]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

# 安装 Docker
[root@centos7 ~]# yum -y install docker-ce

# 启动 Docker
[root@centos7 ~]# systemctl start docker

# 查看 Docker 版本号
[root@centos7 ~]# docker --version

二、安装minikube

# 安装 minikube
[root@centos7 ~]# curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-1.3.1.rpm \
 && sudo rpm -ivh minikube-1.3.1.rpm

三、启动k8s集群

[root@centos7 ~]# sudo minikube start --vm-driver=none  --wait=false

四、安装kubectl

[root@centos7 ~]# curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
[root@centos7 ~]# chmod +x kubectl
[root@centos7 ~]# mv kubectl /usr/local/bin

五、验证集群

[root@centos7 ~]# kubectl get nodes
NAME       STATUS   ROLES    AGE   VERSION
minikube   Ready    <none>   84m   v1.15.2

六、启动Dashboard

[root@centos7 ~]# kubectl create clusterrolebinding kube-system-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
[root@centos7 ~]# minukube dashboard

推荐阅读更多精彩内容