Commit 4f909b92 authored by Brendan Burns's avatar Brendan Burns

Updates to cli docs.

parent 4808d165
...@@ -6,8 +6,8 @@ The ```kubectl``` command provides command line access to the kubernetes API. ...@@ -6,8 +6,8 @@ The ```kubectl``` command provides command line access to the kubernetes API.
#### version #### version
Print the version of the client and server. Print the version of the client and server.
```sh
Usage: Usage:
```
kubectl version [flags] kubectl version [flags]
Available Flags: Available Flags:
...@@ -30,8 +30,9 @@ Use "kubectl help [command]" for more information about that command. ...@@ -30,8 +30,9 @@ Use "kubectl help [command]" for more information about that command.
#### proxy #### proxy
Create a local proxy to the API server Create a local proxy to the API server
```sh
Usage: Usage:
```
kubectl proxy [flags] kubectl proxy [flags]
Available Flags: Available Flags:
...@@ -54,7 +55,6 @@ Usage: ...@@ -54,7 +55,6 @@ Usage:
#### get #### get
Display one or more resources Display one or more resources
```sh
Possible resources include pods (po), replication controllers (rc), services Possible resources include pods (po), replication controllers (rc), services
(se), minions (mi), or events (ev). (se), minions (mi), or events (ev).
...@@ -62,6 +62,7 @@ If you specify a Go template, you can use any fields defined for the API version ...@@ -62,6 +62,7 @@ If you specify a Go template, you can use any fields defined for the API version
you are connecting to the server with. you are connecting to the server with.
Examples: Examples:
```sh
$ kubectl get pods $ kubectl get pods
<list all pods in ps output format> <list all pods in ps output format>
...@@ -70,8 +71,9 @@ Examples: ...@@ -70,8 +71,9 @@ Examples:
$ kubectl get -o json pod 1234-56-7890-234234-456456 $ kubectl get -o json pod 1234-56-7890-234234-456456
<list single pod in json output format> <list single pod in json output format>
```
Usage: Usage:
```
kubectl get [(-o|--output=)json|yaml|...] <resource> [<id>] [flags] kubectl get [(-o|--output=)json|yaml|...] <resource> [<id>] [flags]
Available Flags: Available Flags:
...@@ -100,11 +102,11 @@ Usage: ...@@ -100,11 +102,11 @@ Usage:
#### describe #### describe
Show details of a specific resource. Show details of a specific resource.
```sh
This command joins many API calls together to form a detailed description of a This command joins many API calls together to form a detailed description of a
given resource. given resource.
Usage: Usage:
```
kubectl describe <resource> <id> [flags] kubectl describe <resource> <id> [flags]
Available Flags: Available Flags:
...@@ -136,8 +138,8 @@ Examples: ...@@ -136,8 +138,8 @@ Examples:
$ cat pod.json | kubectl create -f - $ cat pod.json | kubectl create -f -
<create a pod based on the json passed into stdin> <create a pod based on the json passed into stdin>
``` ```
```sh
Usage: Usage:
```
kubectl create -f filename [flags] kubectl create -f filename [flags]
Available Flags: Available Flags:
...@@ -173,8 +175,8 @@ Examples: ...@@ -173,8 +175,8 @@ Examples:
$ cat config.json | kubectl apply -f - $ cat config.json | kubectl apply -f -
<creates all resources listed in config.json> <creates all resources listed in config.json>
``` ```
```sh
Usage: Usage:
```
kubectl createall [-d directory] [-f filename] [flags] kubectl createall [-d directory] [-f filename] [flags]
Available Flags: Available Flags:
...@@ -209,8 +211,8 @@ Examples: ...@@ -209,8 +211,8 @@ Examples:
<update a pod based on the json passed into stdin> <update a pod based on the json passed into stdin>
``` ```
```sh
Usage: Usage:
```
kubectl update -f filename [flags] kubectl update -f filename [flags]
Available Flags: Available Flags:
...@@ -257,8 +259,8 @@ Examples: ...@@ -257,8 +259,8 @@ Examples:
<delete a pod with ID 1234-56-7890-234234-456456> <delete a pod with ID 1234-56-7890-234234-456456>
``` ```
```sh
Usage: Usage:
```
kubectl delete ([-f filename] | (<resource> [(<id> | -l <label>)] [flags] kubectl delete ([-f filename] | (<resource> [(<id> | -l <label>)] [flags]
Available Flags: Available Flags:
...@@ -289,8 +291,8 @@ Examples: ...@@ -289,8 +291,8 @@ Examples:
$ kubectl log -f 123456-7890 ruby-container $ kubectl log -f 123456-7890 ruby-container
<starts streaming of ruby-container logs from pod 123456-7890> <starts streaming of ruby-container logs from pod 123456-7890>
``` ```
```sh
Usage: Usage:
```
kubectl log [-f] <pod> [<container>] [flags] kubectl log [-f] <pod> [<container>] [flags]
Available Flags: Available Flags:
...@@ -311,7 +313,7 @@ Usage: ...@@ -311,7 +313,7 @@ Usage:
``` ```
### Usage ### Usage
```sh ```
Usage: Usage:
kubectl [flags] kubectl [flags]
kubectl [command] kubectl [command]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment