1、column PORTS is missed
2、fix command `kubectl get pods`output
reviewable/pr2602/r1
chenhuan12 2017-02-17 16:54:23 +08:00 committed by mengyuan
parent 17daf981f7
commit e854c082ad
1 changed files with 8 additions and 7 deletions

View File

@ -72,8 +72,8 @@ When kubelet starts, it automatically starts all pods defined in directory speci
```shell ```shell
[joe@my-node1 ~] $ docker ps [joe@my-node1 ~] $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS NAMES CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f6d05272b57e nginx:latest "nginx" 8 minutes ago Up 8 minutes k8s_web.6f802af4_static-web-fk-node1_default_67e24ed9466ba55986d120c867395f3c_378e5f3c f6d05272b57e nginx:latest "nginx" 8 minutes ago Up 8 minutes k8s_web.6f802af4_static-web-fk-node1_default_67e24ed9466ba55986d120c867395f3c_378e5f3c
``` ```
If we look at our Kubernetes API server (running on host `my-master`), we see that a new mirror-pod was created there too: If we look at our Kubernetes API server (running on host `my-master`), we see that a new mirror-pod was created there too:
@ -81,9 +81,9 @@ If we look at our Kubernetes API server (running on host `my-master`), we see th
```shell ```shell
[joe@host ~] $ ssh my-master [joe@host ~] $ ssh my-master
[joe@my-master ~] $ kubectl get pods [joe@my-master ~] $ kubectl get pods
POD IP CONTAINER(S) IMAGE(S) HOST LABELS STATUS CREATED MESSAGE NAME READY STATUS RESTARTS AGE
static-web-my-node1 172.17.0.3 my-node1/192.168.100.71 role=myrole Running 11 minutes static-web-my-node1 1/1 Running 0 2m
web nginx Running 11 minutes
``` ```
Labels from the static pod are propagated into the mirror-pod and can be used as usual for filtering. Labels from the static pod are propagated into the mirror-pod and can be used as usual for filtering.
@ -94,8 +94,9 @@ Notice we cannot delete the pod with the API server (e.g. via [`kubectl`](/docs/
[joe@my-master ~] $ kubectl delete pod static-web-my-node1 [joe@my-master ~] $ kubectl delete pod static-web-my-node1
pods/static-web-my-node1 pods/static-web-my-node1
[joe@my-master ~] $ kubectl get pods [joe@my-master ~] $ kubectl get pods
POD IP CONTAINER(S) IMAGE(S) HOST ... NAME READY STATUS RESTARTS AGE
static-web-my-node1 172.17.0.3 my-node1/192.168.100.71 ... static-web-my-node1 1/1 Running 0 12s
``` ```
Back to our `my-node1` host, we can try to stop the container manually and see, that kubelet automatically restarts it in a while: Back to our `my-node1` host, we can try to stop the container manually and see, that kubelet automatically restarts it in a while: