使用Minikube来在本地运行Kubernetes

2018-01-05  本文已影响654人  贾磊_cd

只支持单节点的Kubernetes集群,并且需要运行虚拟机,所以只能运行在裸机上或者VMware虚拟机上。

See the link on https://kubernetes.io/docs/getting-started-guides/minikube/

Minikube is a tool that makes it easy to run Kubernetes locally

Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day

Install MiniKube

  1. download the latest release with command: curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
  2. make the kubectl binary executable chmod +x ./kubectl
  3. move the binary in to your PATH sudo mv ./kubectl /usr/local/bin/kubectl
  4. check kubectl config file, it will be auto create when you create a cluster using kube-up.sh or successfully deploy a Minikube cluster
  1. Enabling shell autocompletion, kubectl includes autocompletion support, which can save a lot of typing!
  1. install Chocolatey
  2. choco install kubernetes-cli
  3. do configuration
    cd C:\users\yourusername (Or wherever your %HOME% directory is)
    mkdir .kube
    cd .kube
    touch config
上一篇 下一篇

猜你喜欢

热点阅读