-
同一主機支援多個容器後端
-
只支援Linux
-
使用boot2docker映象
-
模組化支援各家雲提供商外掛
-
命令列方式操作
-
不支援Windows和Mac
-
安裝簡便
-
自動配置命令列
-
圖形化介面配置
-
一鍵啟停作業
-
共享捲時效能很差
-
高耗能降低電池使用時間
-
支援Windows 10 pro或者enterprise
$ minikube start
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.
-
本地環境易於訪問
-
Kubernetes可用
-
Kubernetes在空閑時耗費大量電力
-
感覺還是跟docker-machine很類似
-
內建Docker版本嚴重滯後
-
有些功能尚不支援,例如RBAC(role-based authentication control)
-
需要使用minikube start/stop
kubectl config use-context docker-for-desktop
$kubectl version
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.2", GitCommit:"bdaeafa71f6c7c04636251031f93464384d54963", GitTreeState:"clean", BuildDate:"2017-10-24T19:48:57Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.2", GitCommit:"bdaeafa71f6c7c04636251031f93464384d54963", GitTreeState:"clean", BuildDate:"2017-10-24T19:38:10Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
$kubectl get stacks
No resources found.
$ kubectl get crd
NAME AGE
stacks.compose.docker.com 24d
$ docker stack deploy prometheus -c ./docker-compose.yml
Stack prometheus was created
Waiting for the stack to be stable and running...
- Service exporter has one container running
- Service grafana has one container running
- Service prom has one container running
Stack prometheus is stable and running
$ kubectl get stacks
NAME AGE
prometheus 1m
$kubectl get pods
NAME READY STATUS RESTARTS AGE
exporter-66c7bbfcc6-r5sq4 1/1 Running 0 2m
grafana-7c5f5f6b75-rfgzp 1/1 Running 0 2m
prom-76b4f584f7-qckc9 0/1 CrashLoopBackOff 4 2m
-
kubectl apply 支援YAML
-
helm
-
RBAC啟用
$ mkdir -p go/src/github.com/openfaas/ && \
cd go/src/github.com/openfaas/ && \
git clone https://github.com/openfaas/faas-netes && \
cd faas-netes && \
kubectl apply -f ./yaml
service "alertmanager" created
deployment "alertmanager" created
configmap "alertmanager-config" configured
service "faas-netesd" created
deployment "faas-netesd" created
deployment "gateway" created
service "gateway" created
service "nats" created
deployment "nats" created
service "prometheus" created
deployment "prometheus" created
configmap "prometheus-config" configured
deployment "queue-worker" created
serviceaccount "faas-controller" configured
role "faas-controller" configured
rolebinding "faas-controller-fn" configured
$ kubectl get all --namespace openfaas
$ kubectl get all --namespace openfaas-fn
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deploy/figlet 1 1 1 1 8m
NAME DESIRED CURRENT READY AGE
rs/figlet-676c995d66 1 1 1 8m
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deploy/figlet 1 1 1 1 8m
NAME DESIRED CURRENT READY AGE
rs/figlet-676c995d66 1 1 1 8m
NAME READY STATUS RESTARTS AGE
po/figlet-676c995d66-rqjpn 1/1 Running 0 8m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
svc/figlet ClusterIP 10.101.45.157 8080/TCP 8m
-
https://www.docker.com/docker-mac
-
https://www.vagrantup.com/
-
https://github.com/ahmetb/kubectx
-
https://docs.docker.com/datacenter/ucp/2.2/guides/
-
https://news.ycombinator.com/item?id=16084243
本次培訓包含:Kubernetes核心概念;Kubernetes叢集的安裝配置、運維管理、架構規劃;Kubernetes元件、監控、網路;針對於Kubernetes API介面的二次開發;DevOps基本理念;微服務架構;微服務的容器化等,點選識別下方二維碼加微信好友瞭解具體培訓內容。