Skip to content

Commit 049c989

Browse files
committed
Update kubectl get command in docs/devel/
1 parent f7e1a00 commit 049c989

File tree

1 file changed

+36
-34
lines changed

1 file changed

+36
-34
lines changed

docs/devel/developer-guides/vagrant.md

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ Vagrant will provision each machine in the cluster with all the necessary compon
3636

3737
By default, each VM in the cluster is running Fedora, and all of the Kubernetes services are installed into systemd.
3838

39-
To access the master or any minion:
39+
To access the master or any node:
4040

4141
```sh
4242
vagrant ssh master
4343
vagrant ssh minion-1
4444
```
4545

46-
If you are running more than one minion, you can access the others by:
46+
If you are running more than one nodes, you can access the others by:
4747

4848
```sh
4949
vagrant ssh minion-2
@@ -97,12 +97,12 @@ Once your Vagrant machines are up and provisioned, the first thing to do is to c
9797
You may need to build the binaries first, you can do this with ```make```
9898

9999
```sh
100-
$ ./cluster/kubectl.sh get minions
100+
$ ./cluster/kubectl.sh get nodes
101101

102-
NAME LABELS
103-
10.245.1.4 <none>
104-
10.245.1.5 <none>
105-
10.245.1.3 <none>
102+
NAME LABELS STATUS
103+
kubernetes-minion-0whl kubernetes.io/hostname=kubernetes-minion-0whl Ready
104+
kubernetes-minion-4jdf kubernetes.io/hostname=kubernetes-minion-4jdf Ready
105+
kubernetes-minion-epbe kubernetes.io/hostname=kubernetes-minion-epbe Ready
106106
```
107107

108108
### Interacting with your Kubernetes cluster with the `kube-*` scripts.
@@ -153,23 +153,23 @@ cat ~/.kubernetes_vagrant_auth
153153
}
154154
```
155155

156-
You should now be set to use the `cluster/kubectl.sh` script. For example try to list the minions that you have started with:
156+
You should now be set to use the `cluster/kubectl.sh` script. For example try to list the nodes that you have started with:
157157

158158
```sh
159-
./cluster/kubectl.sh get minions
159+
./cluster/kubectl.sh get nodes
160160
```
161161

162162
### Running containers
163163

164-
Your cluster is running, you can list the minions in your cluster:
164+
Your cluster is running, you can list the nodes in your cluster:
165165

166166
```sh
167-
$ ./cluster/kubectl.sh get minions
167+
$ ./cluster/kubectl.sh get nodes
168168

169-
NAME LABELS
170-
10.245.2.4 <none>
171-
10.245.2.3 <none>
172-
10.245.2.2 <none>
169+
NAME LABELS STATUS
170+
kubernetes-minion-0whl kubernetes.io/hostname=kubernetes-minion-0whl Ready
171+
kubernetes-minion-4jdf kubernetes.io/hostname=kubernetes-minion-4jdf Ready
172+
kubernetes-minion-epbe kubernetes.io/hostname=kubernetes-minion-epbe Ready
173173
```
174174

175175
Now start running some containers!
@@ -179,29 +179,31 @@ Before starting a container there will be no pods, services and replication cont
179179

180180
```
181181
$ cluster/kubectl.sh get pods
182-
NAME IMAGE(S) HOST LABELS STATUS
182+
NAME READY STATUS RESTARTS AGE
183183
184184
$ cluster/kubectl.sh get services
185-
NAME LABELS SELECTOR IP PORT
185+
NAME LABELS SELECTOR IP(S) PORT(S)
186186
187-
$ cluster/kubectl.sh get replicationcontrollers
188-
NAME IMAGE(S SELECTOR REPLICAS
187+
$ cluster/kubectl.sh get rc
188+
CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS
189189
```
190190

191191
Start a container running nginx with a replication controller and three replicas
192192

193193
```
194194
$ cluster/kubectl.sh run my-nginx --image=nginx --replicas=3 --port=80
195+
CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS
196+
my-nginx my-nginx nginx run=my-nginx 3
195197
```
196198

197199
When listing the pods, you will see that three containers have been started and are in Waiting state:
198200

199201
```
200202
$ cluster/kubectl.sh get pods
201-
NAME IMAGE(S) HOST LABELS STATUS
202-
781191ff-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.4/10.245.2.4 name=myNginx Waiting
203-
7813c8bd-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.2/10.245.2.2 name=myNginx Waiting
204-
78140853-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.3/10.245.2.3 name=myNginx Waiting
203+
NAME READY STATUS RESTARTS AGE
204+
my-nginx-389da 1/1 Waiting 0 33s
205+
my-nginx-kqdjk 1/1 Waiting 0 33s
206+
my-nginx-nyj3x 1/1 Waiting 0 33s
205207
```
206208

207209
You need to wait for the provisioning to complete, you can monitor the minions by doing:
@@ -228,17 +230,17 @@ Going back to listing the pods, services and replicationcontrollers, you now hav
228230

229231
```
230232
$ cluster/kubectl.sh get pods
231-
NAME IMAGE(S) HOST LABELS STATUS
232-
781191ff-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.4/10.245.2.4 name=myNginx Running
233-
7813c8bd-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.2/10.245.2.2 name=myNginx Running
234-
78140853-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.3/10.245.2.3 name=myNginx Running
233+
NAME READY STATUS RESTARTS AGE
234+
my-nginx-389da 1/1 Running 0 33s
235+
my-nginx-kqdjk 1/1 Running 0 33s
236+
my-nginx-nyj3x 1/1 Running 0 33s
235237
236238
$ cluster/kubectl.sh get services
237-
NAME LABELS SELECTOR IP PORT
239+
NAME LABELS SELECTOR IP(S) PORT(S)
238240
239-
$ cluster/kubectl.sh get replicationcontrollers
240-
NAME IMAGE(S SELECTOR REPLICAS
241-
myNginx nginx name=my-nginx 3
241+
$ cluster/kubectl.sh get rc
242+
NAME IMAGE(S) SELECTOR REPLICAS
243+
my-nginx nginx run=my-nginx 3
242244
```
243245

244246
We did not start any services, hence there are none listed. But we see three replicas displayed properly.
@@ -248,9 +250,9 @@ You can already play with scaling the replicas with:
248250
```sh
249251
$ ./cluster/kubectl.sh scale rc my-nginx --replicas=2
250252
$ ./cluster/kubectl.sh get pods
251-
NAME IMAGE(S) HOST LABELS STATUS
252-
7813c8bd-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.2/10.245.2.2 name=myNginx Running
253-
78140853-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.3/10.245.2.3 name=myNginx Running
253+
NAME READY STATUS RESTARTS AGE
254+
my-nginx-kqdjk 1/1 Running 0 13m
255+
my-nginx-nyj3x 1/1 Running 0 13m
254256
```
255257

256258
Congratulations!

0 commit comments

Comments
 (0)