kubectl安装
kubectl 是 Kubernetes 自带的客户端,可以用它来直接操作 Kubernetes。
window平台(需要bash on ubuntu环境)
1 2 3 4 5 6 7 8
| bash
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/windows/amd64/kubectl.exe
exit
.\kubectl.exe version
|
Linux平台
1 2 3 4 5 6 7 8
| #下载kubectl curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl #添加权限 chmod +x ./kubectl #设置全局命令(环境变量) sudo mv ./kubectl /usr/local/bin/kubectl #检查安装成功与否 kubectl version
|
Minikube安装
virtualBox
Linux
1 2 3 4 5 6 7
| #安装配置minikube curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.22.1/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ #查看版本 minikube version #下载virtualbox wget http://download.virtualbox.org/virtualbox/5.1.26/VirtualBox-5.1-5.1.26_117224_el7-1.x86_64.rpm
|
Windos
1 2 3 4
| curl -Lo minikube.exe https://storage.googleapis.com/minikube/releases/v0.22.1/minikube-windows-amd64.exe
./minikube.exe version
|
。。。。。放弃,转用swarm ,已卸载相关下载文件
弃坑理由:安装负杂,需要安装虚拟机,对环境要求高,学习成本高,swarm和Kubernetes对dockers的差距越来越小