The simplest way to create a Kubernetes cluster (single machine version) is by using minikube. If you are operating in China's network environment, you can also consider utilizing AllInOne deployment from kubeasz.
# start minikube.# HTTP proxy needed in China$minikubestart--docker-envHTTP_PROXY=http://proxy-ip:port--docker-envHTTPS_PROXY=http://proxy-ip:port--vm-driver=hyperkit
Utilizing calico
Minikube supports configuration using the CNI (Container Network Interface) plugins, which enables an easy access to a variety of community-provided network plugins, like calico which also supports Network Policy.
Minikube/localkube only offers the formal release versions.
However, if you're looking to deploy a master or developer version, you can start a local cluster using hack/local-up-cluster.sh:
cd $GOPATH/src/k8s.io/kuberneteshack/local-up-cluster.sh
Then, open another terminal to configure kubectl:
cd $GOPATH/src/k8s.io/kubernetescluster/kubectl.shgetpodscluster/kubectl.shgetservicescluster/kubectl.shgetreplicationcontrollerscluster/kubectl.shrunmy-nginx--image=nginx--port=80
Kind
Use kind to operate a Kubernetes cluster via Docker containers:
$gogetsigs.k8s.io/kind# ensure that Kubernetes is cloned in $(go env GOPATH)/src/k8s.io/kubernetes# build a node image$kindbuildnode-image# create a cluster with kind build node-image$kindcreatecluster--imagekindest/node:latest