安装
安装 minikube
- https://github.com/kubernetes/minikube
- https://kubernetes.io/docs/tasks/tools/
- Install kubectl on Linux
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && sudo install minikube-linux-amd64 /usr/local/bin/minikube
$ minikube version
minikube version: v1.0.0
安装 kubectl
https://packages.cloud.google.com/apt/doc/apt-key.gpg
https://apt.kubernetes.io/
sudo apt-get update && sudo apt-get install -y apt-transport-https curl
curl -s https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl kubelet kubeadm
Docker 的配置文件:~/.docker/config.json
。至少,docker login 之后会生成一个。
~/.minikube/
apt-get update && apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y kubelet kubeadm kubectl
apt-mark hold kubelet kubeadm kubectl
参考资料与拓展阅读
- 知乎专栏, 推荐一款Kubernetes神器“minikube”
- 知乎专栏, Minikube 入门初体验
- 云+社区, 一文搞懂 Minikube 底层原理