使用Minikube 部署 Kubernetes 集群

单机部署

创建Kubernetes cluster(单机版)最简单的方法是minikube:

首先下载kubectl

curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl
chmod +x kubectl

安装minikube

# install minikube
$ brew cask install minikube
$ brew install docker-machine-driver-xhyve
# docker-machine-driver-xhyve need root owner and uid
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

最后启动minikube

# start minikube.
# http proxy is required in China
$ minikube start --docker-env HTTP_PROXY=http://proxy-ip:port --docker-env HTTPS_PROXY=http://proxy-ip:port --vm-driver=xhyve

开发版

minikube/localkube只提供了正式release版本,而如果想要部署master或者开发版的话,则可以用hack/local-up-cluster.sh来启动一个本地集群:

cd $GOPATH/src/k8s.io/kubernetes

export KUBERNETES_PROVIDER=local
hack/install-etcd.sh
export PATH=$GOPATH/src/k8s.io/kubernetes/third_party/etcd:$PATH
hack/local-up-cluster.sh

打开另外一个终端,配置kubectl:

cd $GOPATH/src/k8s.io/kubernetes
export KUBECONFIG=/var/run/kubernetes/admin.kubeconfig
cluster/kubectl.sh

//本文由 aleen42 提供 /发布在 feisky

K8S中文社区微信公众号

译者

蒲公英

我是一朵蒲公英,哗啦啦的飞!

《使用Minikube 部署 Kubernetes 集群》有66个想法

  1. Pingback: cialis reviews
  2. Pingback: cialis generic 10 mg
  3. Pingback: ivermectin brand name
  4. Pingback: ivermectin and covid
  5. Pingback: ivermectin dose
  6. Pingback: 160 mg lasix
  7. Pingback: lasix 0.5 mg
  8. Pingback: stromectol oral
  9. Pingback: cost of stromectol
  10. Pingback: india ivermectin
  11. Pingback: ivermectin price usa
  12. Pingback: stromectol price usa
  13. Pingback: ivermectin japan
  14. Pingback: merck and ivermectin
  15. Pingback: buy ivermectin uk
  16. Pingback: stromectol 0.5 mg
  17. Pingback: how to get ivermectin
  18. Pingback: do-posle-psihologa
  19. Pingback: stromectol generic
  20. Pingback: ivermectin cost
  21. Pingback: confeitofilm
  22. Pingback: OnOverseas.Com
  23. Pingback: biznes kniga

发表评论

电子邮件地址不会被公开。

Time limit exceeded. Please complete the captcha once again.