iSt0ne's Notes

CentOS 7 安装Kubernetes 1.5.3 集群(GCP安装)

在Google Cloud Platform中创建虚拟机

在GCP上开四个虚拟机,1个用作Kubernetes Master,3个用作Kubernetes Node

GCP VM

由于用到google的rpm包仓库(packages.cloud.google.com)和容器仓库(gcr.io),如果是本地部署服务器需要翻墙。

登陆所有4台机器安装kubelet和kubeadm

你将会安装如下软件包:

docker:容器运行时,被Kubernetes依赖
kubelet:Kubernetes核心组件,他运行在集群中的所有节点上,用来启动容器和pods
kubectl:命令行工具,用来控制集群,只需要安装到kube-master上
kubeadm:集群安装工具

在所有节点上执行以下命令:

cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
       https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
setenforce 0
yum install -y docker kubelet kubeadm kubectl kubernetes-cni
systemctl enable docker && systemctl start docker
systemctl enable kubelet && systemctl start kubelet

需要安装的软件包版本信息:

===================================================================================================================
 Package                           Arch       Version                                   Repository            Size
===================================================================================================================
Installing:
 docker                            x86_64     2:1.12.5-14.el7.centos                    extras                20 M
 kubeadm                           x86_64     1.6.0-0.alpha.0.2074.a092d8e0f95f52       kubernetes           5.8 M
 kubectl                           x86_64     1.5.1-0                                   google-cloud-sdk     6.6 M
 kubelet                           x86_64     1.5.1-0                                   kubernetes            12 M
 kubernetes-cni                    x86_64     0.3.0.1-0.07a8a2                          kubernetes           9.8 M

初始化kube-master

# 执行kubeadm初始化

[root@k8s-master ~]# kubeadm init
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.
[preflight] Running pre-flight checks
[preflight] WARNING: firewalld is active, please ensure ports [6443 9898 10250] are open or your cluster may not function correctly
[init] Using Kubernetes version: v1.5.3
[tokens] Generated token: "fcb846.de4beeec6105bc58"
[certificates] Generated Certificate Authority key and certificate.
[certificates] Generated API Server key and certificate
[certificates] Generated Service Account signing keys
[certificates] Created keys and certificates in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/admin.conf"
[apiclient] Created API client, waiting for the control plane to become ready
[apiclient] All control plane components are healthy after 28.279950 seconds
[apiclient] Waiting for at least one node to register and become ready
[apiclient] First node is ready after 5.502420 seconds
[apiclient] Creating a test deployment
[apiclient] Test deployment succeeded
[token-discovery] Created the kube-discovery deployment, waiting for it to become ready
[token-discovery] kube-discovery is ready after 9.502653 seconds
[addons] Created essential addon: kube-proxy
[addons] Created essential addon: kube-dns

Your Kubernetes master has initialized successfully!

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
http://kubernetes.io/docs/admin/addons/

You can now join any number of machines by running the following on each node:

kubeadm join --token=fcb846.de4beeec6105bc58 10.128.0.2

# 获取Kubernetes节点信息

[root@k8s-master ~]# kubectl get nodes
NAME         STATUS         AGE
k8s-master   Ready,master   46s

将kube-node加入集群

[root@k8s-node1 ~]# kubeadm join --token=fcb846.de4beeec6105bc58 10.128.0.2
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.
[preflight] Running pre-flight checks
[tokens] Validating provided token
[discovery] Created cluster info discovery client, requesting info from "http://10.128.0.2:9898/cluster-info/v1/?token-id=fcb846"
[discovery] Cluster info object received, verifying signature using given token
[discovery] Cluster info signature and contents are valid, will use API endpoints [https://10.128.0.2:6443]
[bootstrap] Trying to connect to endpoint https://10.128.0.2:6443
[bootstrap] Detected server version: v1.5.3
[bootstrap] Successfully established connection with endpoint "https://10.128.0.2:6443"
[csr] Created API client to obtain unique certificate for this node, generating keys and certificate signing request
[csr] Received signed certificate from the API server:
Issuer: CN=kubernetes | Subject: CN=system:node:k8s-node1 | CA: false
Not before: 2017-02-24 03:43:00 +0000 UTC Not After: 2018-02-24 03:43:00 +0000 UTC
[csr] Generating kubelet configuration
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"

Node join complete:
* Certificate signing request sent to master and response
  received.
* Kubelet informed of new secure connection details.

Run 'kubectl get nodes' on the master to see this machine join.

# 所有三个节点均加入集群:

[root@k8s-master ~]# kubectl get nodes
NAME         STATUS         AGE
k8s-master   Ready,master   1m
k8s-node1    Ready          17s
k8s-node2    Ready          6s
k8s-node3    Ready          8s

部署pod网络

为了不同节点上的pods进行通信,需要安装pod网络插件。这里使用Weave Net,也可以用Calico和Canal

[root@k8s-master ~]# kubectl apply -f https://git.io/weave-kube
daemonset "weave-net” created

[root@k8s-master ~]# kubectl get pods --all-namespaces
NAMESPACE     NAME                                 READY     STATUS     RESTARTS   AGE
kube-system   dummy-2088944543-0cqkm               1/1       Running    0          7m
kube-system   etcd-k8s-master                      1/1       Running    0          6m
kube-system   kube-apiserver-k8s-master            1/1       Running    0          7m
kube-system   kube-controller-manager-k8s-master   1/1       Running    0          7m
kube-system   kube-discovery-1769846148-hnx4t      1/1       Running    0          7m
kube-system   kube-dns-2924299975-0jmpb            4/4       Running    0          6m
kube-system   kube-proxy-0521x                     1/1       Running    0          6m
kube-system   kube-proxy-bf3bt                     1/1       Running    0          6m
kube-system   kube-proxy-d5frt                     1/1       Running    0          6m
kube-system   kube-proxy-s7963                     1/1       Running    0          7m
kube-system   kube-scheduler-k8s-master            1/1       Running    0          7m
kube-system   weave-net-42p52                      2/2       Running    0          2m
kube-system   weave-net-9x1m6                      2/2       Running    0          2m
kube-system   weave-net-fgwll                      2/2       Running    0          2m
kube-system   weave-net-n8scq                      2/2       Running    0          2m

需要等一会,待 kube-dns部署完成。

Kubernetes master需要的容器镜像及版本如下:

[root@k8s-master ~]# docker images
REPOSITORY                                               TAG                 IMAGE ID            CREATED             SIZE
gcr.io/google_containers/kube-proxy-amd64                v1.5.3              932ee3606ada        8 days ago          173.5 MB
gcr.io/google_containers/kube-scheduler-amd64            v1.5.3              cb0ce9bb60f9        8 days ago          54 MB
gcr.io/google_containers/kube-controller-manager-amd64   v1.5.3              25304c6f1bb2        8 days ago          102.8 MB
gcr.io/google_containers/kube-apiserver-amd64            v1.5.3              93d8b30a8f27        8 days ago          125.9 MB
docker.io/weaveworks/weave-npc                           1.9.0               460b9ad16e86        3 weeks ago         58.22 MB
docker.io/weaveworks/weave-kube                          1.9.0               568b0ac069ad        3 weeks ago         162.7 MB
gcr.io/google_containers/etcd-amd64                      3.0.14-kubeadm      856e39ac7be3        3 months ago        174.9 MB
gcr.io/google_containers/kube-discovery-amd64            1.0                 c5e0c9a457fc        5 months ago        134.2 MB
gcr.io/google_containers/pause-amd64                     3.0                 99e59f495ffa        9 months ago        746.9 kB

Kubernetes node需要的容器镜像及版本如下:

[root@k8s-node1 ~]# docker images
REPOSITORY                                       TAG                 IMAGE ID            CREATED             SIZE
gcr.io/google_containers/kube-proxy-amd64        v1.5.3              932ee3606ada        8 days ago          173.5 MB
docker.io/openzipkin/zipkin                      latest              bca222de8bbb        11 days ago         188.6 MB
docker.io/weaveworks/weave-npc                   1.9.0               460b9ad16e86        3 weeks ago         58.22 MB
docker.io/weaveworks/weave-kube                  1.9.0               568b0ac069ad        3 weeks ago         162.7 MB
docker.io/rabbitmq                               3                   ec798eba2c56        5 weeks ago         178.9 MB
docker.io/weaveworksdemos/shipping               0.4.0               b3197248fe19        7 weeks ago         198.5 MB
gcr.io/google_containers/kubedns-amd64           1.9                 26cf1ed9b144        3 months ago        47 MB
gcr.io/google_containers/dnsmasq-metrics-amd64   1.0                 5271aabced07        3 months ago        14 MB
gcr.io/google_containers/kube-dnsmasq-amd64      1.4                 3ec65756a89b        4 months ago        5.126 MB
gcr.io/google_containers/exechealthz-amd64       1.2                 93a43bfb39bf        5 months ago        8.375 MB
gcr.io/google_containers/pause-amd64             3.0                 99e59f495ffa        9 months ago        746.9 kB

部署微服务

# 创建sock-shop命名空间

[root@k8s-master ~]# kubectl create namespace sock-shop
namespace "sock-shop” created

# 部署sock-shop服务

[root@k8s-master ~]# kubectl apply -n sock-shop -f "https://github.com/microservices-demo/microservices-demo/blob/master/deploy/kubernetes/complete-demo.yaml?raw=true"
namespace "sock-shop" configured
deployment "cart-db" created
service "cart-db" created
deployment "cart" created
service "cart" created
deployment "catalogue-db" created
service "catalogue-db" created
deployment "catalogue" created
service "catalogue" created
deployment "front-end" created
service "front-end" created
deployment "orders-db" created
service "orders-db" created
deployment "orders" created
service "orders" created
deployment "payment" created
service "payment" created
deployment "queue-master" created
service "queue-master" created
deployment "rabbitmq" created
service "rabbitmq" created
deployment "shipping" created
service "shipping" created
deployment "user-db" created
service "user-db" created
deployment "user" created
service "user" created
deployment "zipkin" created
service "zipkin" created
deployment "zipkin-mysql" created
service "zipkin-mysql" created
deployment "zipkin-cron” created

# 查看front-end服务部署情况

[root@k8s-master ~]# kubectl describe svc front-end -n sock-shop
Name:                   front-end
Namespace:              sock-shop
Labels:                 name=front-end
Selector:               name=front-end
Type:                   NodePort
IP:                     10.110.80.52
Port:                   <unset> 80/TCP
NodePort:               <unset> 30001/TCP
Endpoints:              10.40.0.3:8079
Session Affinity:       None
No events.

[root@k8s-master ~]# kubectl get pods -n sock-shop
NAME                            READY     STATUS    RESTARTS   AGE
cart-2733362716-7639d           1/1       Running   0          1h
cart-db-2053818980-8494x        1/1       Running   0          1h
catalogue-3179692907-4nk58      1/1       Running   0          1h
catalogue-db-2290683463-1s5zk   1/1       Running   0          1h
front-end-2489554388-l83jv      1/1       Running   0          1h
orders-3248148685-x6jv1         1/1       Running   0          1h
orders-db-3277638702-bmd7j      1/1       Running   0          1h
payment-1230586184-756hg        1/1       Running   0          1h
queue-master-1190579278-4vw9m   1/1       Running   0          1h
rabbitmq-3472039365-wp59m       1/1       Running   0          1h
shipping-595972932-3lq7f        1/1       Running   0          1h
user-937712604-d5wrg            1/1       Running   0          1h
user-db-431019311-lvjhf         1/1       Running   0          1h
zipkin-3759864772-rbnqb         1/1       Running   0          1h
zipkin-cron-1577918700-s4htf    1/1       Running   0          1h
zipkin-mysql-1199230279-xsdbk   1/1       Running   0          1h

打开GCP的防火墙规则,允许TCP 30001端口被访问

GCP Firewall

访问:http://104.197.79.251:30001/,其中104.197.79.251为kube-master的外网IP

Sock Shop

# 查看各节点docker运行情况

[root@k8s-master ~]# docker ps
CONTAINER ID        IMAGE                                                           COMMAND                  CREATED             STATUS              PORTS               NAMES
3029ac16cda7        weaveworks/weave-npc:1.9.0                                      "/usr/bin/weave-npc"     About an hour ago   Up About an hour                        k8s_weave-npc.fe6a9424_weave-net-fgwll_kube-system_a99fb014-fa44-11e6-9e2f-42010a800002_2a010c06
75eff534c50b        weaveworks/weave-kube:1.9.0                                     "/home/weave/launch.s"   About an hour ago   Up About an hour                        k8s_weave.25f2d1eb_weave-net-fgwll_kube-system_a99fb014-fa44-11e6-9e2f-42010a800002_5a12dfa5
89e3dcd405b3        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_weave-net-fgwll_kube-system_a99fb014-fa44-11e6-9e2f-42010a800002_f59bd709
cb396f132f72        gcr.io/google_containers/kube-proxy-amd64:v1.5.3                "kube-proxy --kubecon"   About an hour ago   Up About an hour                        k8s_kube-proxy.9283b42f_kube-proxy-s7963_kube-system_f6d143d9-fa43-11e6-9e2f-42010a800002_75642afd
32aa43f719d9        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_kube-proxy-s7963_kube-system_f6d143d9-fa43-11e6-9e2f-42010a800002_e5f75265
8a7a8b1a8d55        gcr.io/google_containers/kube-discovery-amd64:1.0               "/usr/local/bin/kube-"   About an hour ago   Up About an hour                        k8s_kube-discovery.992aca4f_kube-discovery-1769846148-hnx4t_kube-system_f126093a-fa43-11e6-9e2f-42010a800002_9e75b230
5bcb109c3985        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_kube-discovery-1769846148-hnx4t_kube-system_f126093a-fa43-11e6-9e2f-42010a800002_6e010b37
ddb0f97bed8f        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 About an hour ago   Up About an hour                        k8s_dummy.4fbf1b1d_dummy-2088944543-0cqkm_kube-system_efaaab23-fa43-11e6-9e2f-42010a800002_4b5572cd
be0466cba81b        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_dummy-2088944543-0cqkm_kube-system_efaaab23-fa43-11e6-9e2f-42010a800002_8b38f9f1
d646b6594aa8        gcr.io/google_containers/kube-controller-manager-amd64:v1.5.3   "kube-controller-mana"   About an hour ago   Up About an hour                        k8s_kube-controller-manager.da7bbf4b_kube-controller-manager-k8s-master_kube-system_6e27671a55858a8053828c4d16a568b7_e94e8fbe
fe51474a14ad        gcr.io/google_containers/kube-scheduler-amd64:v1.5.3            "kube-scheduler --add"   About an hour ago   Up About an hour                        k8s_kube-scheduler.155bd752_kube-scheduler-k8s-master_kube-system_a765f6975a9dc8eb4f653d19af320b65_c2f182d2
25dd962b3d01        gcr.io/google_containers/kube-apiserver-amd64:v1.5.3            "kube-apiserver --ins"   About an hour ago   Up About an hour                        k8s_kube-apiserver.fe761157_kube-apiserver-k8s-master_kube-system_61215a28d9ca58767b028e3a91e02ad4_ceaf8507
339cc13e8c25        gcr.io/google_containers/etcd-amd64:3.0.14-kubeadm              "etcd --listen-client"   About an hour ago   Up About an hour                        k8s_etcd.c323986f_etcd-k8s-master_kube-system_3a26566bb004c61cd05382212e3f978f_6cda7bee
e131eefae4cc        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_kube-controller-manager-k8s-master_kube-system_6e27671a55858a8053828c4d16a568b7_de313571
2a2e65afba1f        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_kube-apiserver-k8s-master_kube-system_61215a28d9ca58767b028e3a91e02ad4_578cd293
4cb0fd6c16c9        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_kube-scheduler-k8s-master_kube-system_a765f6975a9dc8eb4f653d19af320b65_4d6eaf4c
4a55146e2172        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_etcd-k8s-master_kube-system_3a26566bb004c61cd05382212e3f978f_c47c9015

[root@k8s-node1 ~]# docker ps
CONTAINER ID        IMAGE                                                COMMAND                  CREATED             STATUS              PORTS               NAMES
1ed6fd7d435a        openzipkin/zipkin                                    "/bin/sh -c 'test -n "   About an hour ago   Up About an hour                        k8s_zipkin.dbe8702e_zipkin-3759864772-rbnqb_sock-shop_3d38b9c3-fa45-11e6-9e2f-42010a800002_9d7b00b5
51ea694adf4d        weaveworksdemos/shipping:0.4.0                       "java -Djava.security"   About an hour ago   Up About an hour                        k8s_shipping.272db32c_shipping-595972932-3lq7f_sock-shop_3caf0a38-fa45-11e6-9e2f-42010a800002_996cb8a1
cac9aafab8fb        rabbitmq:3                                           "docker-entrypoint.sh"   About an hour ago   Up About an hour                        k8s_rabbitmq.e7119163_rabbitmq-3472039365-wp59m_sock-shop_3c70bec2-fa45-11e6-9e2f-42010a800002_6809d4cc
8cf94f26b3fd        gcr.io/google_containers/pause-amd64:3.0             "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_zipkin-3759864772-rbnqb_sock-shop_3d38b9c3-fa45-11e6-9e2f-42010a800002_17f013e9
549ae6b98b91        gcr.io/google_containers/pause-amd64:3.0             "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_shipping-595972932-3lq7f_sock-shop_3caf0a38-fa45-11e6-9e2f-42010a800002_754d3a1b
2c9a0cc99551        gcr.io/google_containers/pause-amd64:3.0             "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_rabbitmq-3472039365-wp59m_sock-shop_3c70bec2-fa45-11e6-9e2f-42010a800002_448db747
94eae42bc940        gcr.io/google_containers/kube-dnsmasq-amd64:1.4      "/usr/sbin/dnsmasq --"   About an hour ago   Up About an hour                        k8s_dnsmasq.9f748949_kube-dns-2924299975-0jmpb_kube-system_1b3077e9-fa44-11e6-9e2f-42010a800002_b34624e8
fa577b4b55d2        gcr.io/google_containers/kubedns-amd64:1.9           "/kube-dns --domain=c"   About an hour ago   Up About an hour                        k8s_kube-dns.d672a157_kube-dns-2924299975-0jmpb_kube-system_1b3077e9-fa44-11e6-9e2f-42010a800002_a3eb0f98
d7249a562b2e        gcr.io/google_containers/exechealthz-amd64:1.2       "/exechealthz '--cmd="   About an hour ago   Up About an hour                        k8s_healthz.7cc63e9c_kube-dns-2924299975-0jmpb_kube-system_1b3077e9-fa44-11e6-9e2f-42010a800002_28bee914
ab052a86488b        gcr.io/google_containers/dnsmasq-metrics-amd64:1.0   "/dnsmasq-metrics --v"   About an hour ago   Up About an hour                        k8s_dnsmasq-metrics.556c5e3f_kube-dns-2924299975-0jmpb_kube-system_1b3077e9-fa44-11e6-9e2f-42010a800002_609fcdcd
35c5040c4404        gcr.io/google_containers/pause-amd64:3.0             "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_kube-dns-2924299975-0jmpb_kube-system_1b3077e9-fa44-11e6-9e2f-42010a800002_8a59e945
1d31d6f6f591        weaveworks/weave-npc:1.9.0                           "/usr/bin/weave-npc"     About an hour ago   Up About an hour                        k8s_weave-npc.fe6a9424_weave-net-9x1m6_kube-system_a99fc4d5-fa44-11e6-9e2f-42010a800002_a822c508
d1db1b21c79f        weaveworks/weave-kube:1.9.0                          "/home/weave/launch.s"   About an hour ago   Up About an hour                        k8s_weave.25f2d1eb_weave-net-9x1m6_kube-system_a99fc4d5-fa44-11e6-9e2f-42010a800002_a51b27ff
90a70f2c9e69        gcr.io/google_containers/pause-amd64:3.0             "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_weave-net-9x1m6_kube-system_a99fc4d5-fa44-11e6-9e2f-42010a800002_64885eca
b7d71eb9cf8e        gcr.io/google_containers/kube-proxy-amd64:v1.5.3     "kube-proxy --kubecon"   About an hour ago   Up About an hour                        k8s_kube-proxy.9283b42f_kube-proxy-d5frt_kube-system_1d94e64d-fa44-11e6-9e2f-42010a800002_c0c55ee3
9bad93401f9a        gcr.io/google_containers/pause-amd64:3.0             "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_kube-proxy-d5frt_kube-system_1d94e64d-fa44-11e6-9e2f-42010a800002_9c189527

[root@k8s-node2 ~]# docker ps
CONTAINER ID        IMAGE                                              COMMAND                  CREATED             STATUS              PORTS               NAMES
86b3727801f1        openzipkin/zipkin-dependencies:1.4.0               "crond -f"               About an hour ago   Up About an hour                        k8s_zipkin-cron.7a89368_zipkin-cron-1577918700-s4htf_sock-shop_3db5c3b5-fa45-11e6-9e2f-42010a800002_4a82ba02
ca775fdb7ca2        weaveworksdemos/user:0.4.0                         "/user -port=80"         About an hour ago   Up About an hour                        k8s_user.387fd10d_user-937712604-d5wrg_sock-shop_3d12e725-fa45-11e6-9e2f-42010a800002_16cf9d74
7e316540abf8        weaveworksdemos/queue-master:0.3.0                 "java -Djava.security"   About an hour ago   Up About an hour                        k8s_queue-master.f26b3e6f_queue-master-1190579278-4vw9m_sock-shop_3c4b1098-fa45-11e6-9e2f-42010a800002_d0db1935
fd4209c39bdb        weaveworksdemos/payment:0.4.1                      "/app -port=80"          About an hour ago   Up About an hour                        k8s_payment.3b59b53a_payment-1230586184-756hg_sock-shop_3c1feaeb-fa45-11e6-9e2f-42010a800002_30e75b66
4d70a57b5cfb        mongo                                              "/entrypoint.sh mongo"   About an hour ago   Up About an hour                        k8s_orders-db.8bb1abf6_orders-db-3277638702-bmd7j_sock-shop_3bd9521d-fa45-11e6-9e2f-42010a800002_6a03a0ec
e58c1a5c3da6        weaveworksdemos/catalogue:0.3.0                    "/app -port=80"          About an hour ago   Up About an hour                        k8s_catalogue.2f0b6a6_catalogue-3179692907-4nk58_sock-shop_3b7c3054-fa45-11e6-9e2f-42010a800002_dab118c8
4dc3b4029845        weaveworksdemos/cart:0.4.0                         "java -Djava.security"   About an hour ago   Up About an hour                        k8s_cart.1a43afbc_cart-2733362716-7639d_sock-shop_3b3b9227-fa45-11e6-9e2f-42010a800002_0d90cf72
a53f6219fc94        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_zipkin-cron-1577918700-s4htf_sock-shop_3db5c3b5-fa45-11e6-9e2f-42010a800002_17edec0a
08fbea249248        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_user-937712604-d5wrg_sock-shop_3d12e725-fa45-11e6-9e2f-42010a800002_fb98e0ab
1a57f08a1d26        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_queue-master-1190579278-4vw9m_sock-shop_3c4b1098-fa45-11e6-9e2f-42010a800002_fdf5a384
22bd3f56979e        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_payment-1230586184-756hg_sock-shop_3c1feaeb-fa45-11e6-9e2f-42010a800002_33773f94
d71818e664fb        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_orders-db-3277638702-bmd7j_sock-shop_3bd9521d-fa45-11e6-9e2f-42010a800002_65923a68
56d14e2bb4a2        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_catalogue-3179692907-4nk58_sock-shop_3b7c3054-fa45-11e6-9e2f-42010a800002_d66b4a5f
37f207bb2255        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_cart-2733362716-7639d_sock-shop_3b3b9227-fa45-11e6-9e2f-42010a800002_20e3b2ba
316088990d04        weaveworks/weave-npc:1.9.0                         "/usr/bin/weave-npc"     About an hour ago   Up About an hour                        k8s_weave-npc.fe6a9424_weave-net-n8scq_kube-system_a9a3b9f5-fa44-11e6-9e2f-42010a800002_592e6b51
14822c2d0775        weaveworks/weave-kube:1.9.0                        "/home/weave/launch.s"   About an hour ago   Up About an hour                        k8s_weave.25f2d1eb_weave-net-n8scq_kube-system_a9a3b9f5-fa44-11e6-9e2f-42010a800002_674bfe26
5025726369e3        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_weave-net-n8scq_kube-system_a9a3b9f5-fa44-11e6-9e2f-42010a800002_2534999f
0882da6bfa30        gcr.io/google_containers/kube-proxy-amd64:v1.5.3   "kube-proxy --kubecon"   About an hour ago   Up About an hour                        k8s_kube-proxy.9283b42f_kube-proxy-bf3bt_kube-system_247cfd7e-fa44-11e6-9e2f-42010a800002_f80e0e1a
de1df432966b        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_kube-proxy-bf3bt_kube-system_247cfd7e-fa44-11e6-9e2f-42010a800002_75a741ff

[root@k8s-node3 ~]# docker ps
CONTAINER ID        IMAGE                                              COMMAND                  CREATED             STATUS              PORTS               NAMES
be6aa8c1229a        openzipkin/zipkin-mysql:1.20.0                     "/bin/sh -c /mysql/ru"   About an hour ago   Up About an hour                        k8s_zipkin-mysql.2f63f4e_zipkin-mysql-1199230279-xsdbk_sock-shop_3d6bed0d-fa45-11e6-9e2f-42010a800002_f391e6cd
773f60b11d5e        weaveworksdemos/user-db:0.4.0                      "/entrypoint.sh mongo"   About an hour ago   Up About an hour                        k8s_user-db.5720b5c7_user-db-431019311-lvjhf_sock-shop_3ce8e2c8-fa45-11e6-9e2f-42010a800002_1ad9fdcf
357d7ada8d5a        weaveworksdemos/orders:0.4.2                       "java -Djava.security"   About an hour ago   Up About an hour                        k8s_orders.76f0b188_orders-3248148685-x6jv1_sock-shop_3bff2282-fa45-11e6-9e2f-42010a800002_42a7ce57
cb8eaa703bef        weaveworksdemos/front-end:0.3.1                    "npm start"              About an hour ago   Up About an hour                        k8s_front-end.82150946_front-end-2489554388-l83jv_sock-shop_3b9d1d21-fa45-11e6-9e2f-42010a800002_c8091db6
9ef1e84fc242        weaveworksdemos/catalogue-db:0.3.0                 "docker-entrypoint.sh"   About an hour ago   Up About an hour                        k8s_catalogue-db.dc4a808f_catalogue-db-2290683463-1s5zk_sock-shop_3b5c916f-fa45-11e6-9e2f-42010a800002_650ba165
8f3d0e0452eb        mongo                                              "/entrypoint.sh mongo"   About an hour ago   Up About an hour                        k8s_cart-db.6b1cab11_cart-db-2053818980-8494x_sock-shop_3b212b6f-fa45-11e6-9e2f-42010a800002_37d880e9
2a82f11d926d        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_zipkin-mysql-1199230279-xsdbk_sock-shop_3d6bed0d-fa45-11e6-9e2f-42010a800002_4a486a92
640291044efa        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_user-db-431019311-lvjhf_sock-shop_3ce8e2c8-fa45-11e6-9e2f-42010a800002_ca3d581f
cd07e4ad2423        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_orders-3248148685-x6jv1_sock-shop_3bff2282-fa45-11e6-9e2f-42010a800002_1b736265
1ac256405495        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_front-end-2489554388-l83jv_sock-shop_3b9d1d21-fa45-11e6-9e2f-42010a800002_4f38e321
21899e95edeb        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_catalogue-db-2290683463-1s5zk_sock-shop_3b5c916f-fa45-11e6-9e2f-42010a800002_d1eb5418
920003cb5198        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_cart-db-2053818980-8494x_sock-shop_3b212b6f-fa45-11e6-9e2f-42010a800002_dde75fd2
33800bcee378        weaveworks/weave-npc:1.9.0                         "/usr/bin/weave-npc"     About an hour ago   Up About an hour                        k8s_weave-npc.fe6a9424_weave-net-42p52_kube-system_a99f9567-fa44-11e6-9e2f-42010a800002_310ead5a
eebab1755055        weaveworks/weave-kube:1.9.0                        "/home/weave/launch.s"   About an hour ago   Up About an hour                        k8s_weave.25f2d1eb_weave-net-42p52_kube-system_a99f9567-fa44-11e6-9e2f-42010a800002_1a2bdade
5dc939a8655c        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_weave-net-42p52_kube-system_a99f9567-fa44-11e6-9e2f-42010a800002_569d6e09
5ae94aaee7ef        gcr.io/google_containers/kube-proxy-amd64:v1.5.3   "kube-proxy --kubecon"   About an hour ago   Up About an hour                        k8s_kube-proxy.9283b42f_kube-proxy-0521x_kube-system_2317b278-fa44-11e6-9e2f-42010a800002_7616b5e8
208c13b0de30        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_kube-proxy-0521x_kube-system_2317b278-fa44-11e6-9e2f-42010a800002_ff0e49d4

参考文档:http://kubernetes.io/docs/getting-started-guides/kubeadm/