minikube 构建 单机 Kubernetes
$ curl -Lo kubectl \
http://storage.googleapis.com/kubernetes-release/\
release/v1.3.0/bin/linux/amd64/kubectl \
&& chmod +x kubectl \
&& sudo mv kubectl /usr/local/bin/
$ sudo curl -L \
https://github.com/dhiltgen/docker-machine-kvm/\
releases/download/v0.7.0/docker-machine-driver-kvm \
-o /usr/local/bin/docker-machine-driver-kvm
$ sudo chmod +x /usr/local/bin/docker-machine-driver-kvm
$ curl -Lo minikube \
https://storage.googleapis.com/minikube/\
releases/v0.6.0/minikube-linux-amd64 \
&& chmod +x minikube \
&& sudo mv minikube /usr/local/bin/
$ minikube start --vm-driver=kvm
Starting local Kubernetes cluster...
Kubernetes is available at https://192.168.42.213:8443.
Kubectl is now configured to use the cluster.
$ kubectl run hello-minikube \
--image=gcr.io/google_containers/echoserver:1.4 \
--port=8080
deployment “hello-minikube” created
$ kubectl expose deployment hello-minikube --type=NodePort
service “hello-minikube” exposed
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
hello-minikube-2433534028-ouxw8 1/1 Running 0 4m
$ curl $(minikube service hello-minikube --url)
CLIENT VALUES:
client_address=172.17.0.1
command=GET
real path=/
query=nil
request_version=1.1
request_uri=http://192.168.42.213:8080/
SERVER VALUES:
server_version=nginx: 1.10.0 - lua: 10001
HEADERS RECEIVED:
accept=*/*
host=192.168.42.213:31759
user-agent=curl/7.35.0
BODY:
-no body in request-
$ minikube dashboard
$ minikube stop
Stopping local Kubernetes cluster...
Stopping “minikubeVM”...
$ minikube start --vm-driver=kvm
$ minikube delete
$ minikube addons enable heapster
WARNING: No any other purpose,keeping reminded! So sorry to offended,if necessary, contact me and I do change what I had done to protect your privileges!