Skip to content

Commit

Permalink
Generate new docs with the new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
eparis committed Feb 20, 2015
1 parent aab9cc3 commit 421da20
Show file tree
Hide file tree
Showing 51 changed files with 3,106 additions and 323 deletions.
2 changes: 2 additions & 0 deletions docs/kubectl-config-set-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ Sets a cluster entry in .kubeconfig

### Synopsis

```
Sets a cluster entry in .kubeconfig
Specifying a name that already exists will merge new fields on top of existing values for those fields.
e.g.
kubectl config set-cluster e2e --certificate-authority=~/.kube/e2e/.kubernetes.ca.cert
only sets the certificate-authority field on the e2e cluster entry without touching other values.
```

kubectl config set-cluster name [--server=server] [--certificate-authority=path/to/certficate/authority] [--api-version=apiversion] [--insecure-skip-tls-verify=true]

Expand Down
3 changes: 2 additions & 1 deletion docs/kubectl-config-set-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ Sets a context entry in .kubeconfig

### Synopsis

```
Sets a context entry in .kubeconfig
Specifying a name that already exists will merge new fields on top of existing values for those fields.
e.g.
kubectl config set-context gce --user=cluster-admin
only sets the user field on the gce context entry without touching other values.
```

kubectl config set-context name [--cluster=cluster-nickname] [--user=user-nickname] [--namespace=namespace]

Expand Down
2 changes: 2 additions & 0 deletions docs/kubectl-config-set-credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Sets a user entry in .kubeconfig

### Synopsis

```
Sets a user entry in .kubeconfig
Specifying a name that already exists will merge new fields on top of existing
Expand All @@ -23,6 +24,7 @@ Sets a user entry in .kubeconfig
Bearer token and basic auth are mutually exclusive.
```

kubectl config set-credentials name [--auth-path=authfile] [--client-certificate=certfile] [--client-key=keyfile] [--token=bearer_token] [--username=basic_user] [--password=basic_password]

Expand Down
2 changes: 2 additions & 0 deletions docs/kubectl-config-set.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ Sets an individual value in a .kubeconfig file

### Synopsis

```
Sets an individual value in a .kubeconfig file
property-name is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots.
property-value is the new value you wish to set.
```

kubectl config set property-name property-value

Expand Down
2 changes: 2 additions & 0 deletions docs/kubectl-config-unset.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ Unsets an individual value in a .kubeconfig file

### Synopsis

```
Unsets an individual value in a .kubeconfig file
property-name is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots.
```

kubectl config unset property-name

Expand Down
2 changes: 2 additions & 0 deletions docs/kubectl-config-use-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Sets the current-context in a .kubeconfig file

### Synopsis

```
Sets the current-context in a .kubeconfig file
```

kubectl config use-context context-name

Expand Down
18 changes: 12 additions & 6 deletions docs/kubectl-config-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@ displays merged .kubeconfig settings or a specified .kubeconfig file.

### Synopsis

```
displays merged .kubeconfig settings or a specified .kubeconfig file.
Examples:
// Show merged .kubeconfig settings.
$ kubectl config view

// Show only local ./.kubeconfig settings
$ kubectl config view --local
```

kubectl config view

### Examples

```
// Show merged .kubeconfig settings.
$ kubectl config view
// Show only local ./.kubeconfig settings
$ kubectl config view --local
```

### Options

```
Expand Down
2 changes: 2 additions & 0 deletions docs/kubectl-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ config modifies .kubeconfig files

### Synopsis

```
config modifies .kubeconfig files using subcommands like "kubectl config set current-context my-context"
```

kubectl config <subcommand>

Expand Down
16 changes: 10 additions & 6 deletions docs/kubectl-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@ Create a resource by filename or stdin

### Synopsis

```
Create a resource by filename or stdin.
JSON and YAML formats are accepted.
```

Examples:
kubectl create -f filename

// Create a pod using the data in pod.json.
$ kubectl create -f pod.json
### Examples

// Create a pod based on the JSON passed into stdin.
$ cat pod.json | kubectl create -f -
```
// Create a pod using the data in pod.json.
$ kubectl create -f pod.json
kubectl create -f filename
// Create a pod based on the JSON passed into stdin.
$ cat pod.json | kubectl create -f -
```

### Options

Expand Down
28 changes: 16 additions & 12 deletions docs/kubectl-delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Delete a resource by filename, stdin, or resource and ID.

### Synopsis

```
Delete a resource by filename, stdin, resource and ID, or by resources and label selector.
JSON and YAML formats are accepted.
Expand All @@ -14,25 +15,28 @@ arguments are used and the filename is ignored.
Note that the delete command does NOT do resource version checks, so if someone
submits an update to a resource right when you submit a delete, their update
will be lost along with the rest of the resource.
```

Examples:
kubectl delete ([-f filename] | (<resource> [(<id> | -l <label> | --all)]

// Delete a pod using the type and ID specified in pod.json.
$ kubectl delete -f pod.json
### Examples

// Delete a pod based on the type and ID in the JSON passed into stdin.
$ cat pod.json | kubectl delete -f -
```
// Delete a pod using the type and ID specified in pod.json.
$ kubectl delete -f pod.json
// Delete pods and services with label name=myLabel.
$ kubectl delete pods,services -l name=myLabel
// Delete a pod based on the type and ID in the JSON passed into stdin.
$ cat pod.json | kubectl delete -f -
// Delete a pod with ID 1234-56-7890-234234-456456.
$ kubectl delete pod 1234-56-7890-234234-456456
// Delete pods and services with label name=myLabel.
$ kubectl delete pods,services -l name=myLabel
// Delete all pods
$ kubectl delete pods --all
// Delete a pod with ID 1234-56-7890-234234-456456.
$ kubectl delete pod 1234-56-7890-234234-456456
kubectl delete ([-f filename] | (<resource> [(<id> | -l <label> | --all)]
// Delete all pods
$ kubectl delete pods --all
```

### Options

Expand Down
2 changes: 2 additions & 0 deletions docs/kubectl-describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ Show details of a specific resource

### Synopsis

```
Show details of a specific resource.
This command joins many API calls together to form a detailed description of a
given resource.
```

kubectl describe <resource> <id>

Expand Down
19 changes: 12 additions & 7 deletions docs/kubectl-exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@ Execute a command in a container.

### Synopsis

```
Execute a command in a container.
Examples:
$ kubectl exec -p 123456-7890 -c ruby-container date
<returns output from running 'date' in ruby-container from pod 123456-7890>

$ kubectl exec -p 123456-7890 -c ruby-container -i -t -- bash -il
<switches to raw terminal mode, sends stdin to 'bash' in ruby-container from
pod 123456-780 and sends stdout/stderr from 'bash' back to the client
```

kubectl exec -p <pod> -c <container> -- <command> [<args...>]

### Examples

```
// get output from running 'date' in ruby-container from pod 123456-7890
$ kubectl exec -p 123456-7890 -c ruby-container date
//switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780 and sends stdout/stderr from 'bash' back to the client
$ kubectl exec -p 123456-7890 -c ruby-container -i -t -- bash -il
```

### Options

```
Expand Down
16 changes: 10 additions & 6 deletions docs/kubectl-expose.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,24 @@ Take a replicated application and expose it as Kubernetes Service

### Synopsis

```
Take a replicated application and expose it as Kubernetes Service.
Looks up a ReplicationController by name, and uses the selector for that replication controller
as the selector for a new Service on the specified port.
```

Examples:
kubectl expose <name> --port=<port> [--protocol=TCP|UDP] [--container-port=<number-or-name>] [--service-name=<name>] [--public-ip=<ip>] [--create-external-load-balancer]

// Creates a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000.
$ kubectl expose nginx --port=80 --container-port=8000
### Examples

// Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video-stream'.
$ kubectl expose streamer --port=4100 --protocol=udp --service-name=video-stream
```
// Creates a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000.
$ kubectl expose nginx --port=80 --container-port=8000
kubectl expose <name> --port=<port> [--protocol=TCP|UDP] [--container-port=<number-or-name>] [--service-name=<name>] [--public-ip=<ip>] [--create-external-load-balancer]
// Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video-stream'.
$ kubectl expose streamer --port=4100 --protocol=udp --service-name=video-stream
```

### Options

Expand Down
28 changes: 16 additions & 12 deletions docs/kubectl-get.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,36 @@ Display one or many resources

### Synopsis

```
Display one or many resources.
Possible resources include pods (po), replication controllers (rc), services
(se), minions (mi), or events (ev).
By specifying the output as 'template' and providing a Go template as the value
of the --template flag, you can filter the attributes of the fetched resource(s).
```

Examples:
kubectl get [(-o|--output=)json|yaml|template|...] <resource> [<id>]

// List all pods in ps output format.
$ kubectl get pods
### Examples

// List a single replication controller with specified ID in ps output format.
$ kubectl get replicationController 1234-56-7890-234234-456456
```
// List all pods in ps output format.
$ kubectl get pods
// List a single pod in JSON output format.
$ kubectl get -o json pod 1234-56-7890-234234-456456
// List a single replication controller with specified ID in ps output format.
$ kubectl get replicationController 1234-56-7890-234234-456456
// Return only the status value of the specified pod.
$ kubectl get -o template pod 1234-56-7890-234234-456456 --template={{.currentState.status}}
// List a single pod in JSON output format.
$ kubectl get -o json pod 1234-56-7890-234234-456456
// List all replication controllers and services together in ps output format.
$ kubectl get rc,services
// Return only the status value of the specified pod.
$ kubectl get -o template pod 1234-56-7890-234234-456456 --template={{.currentState.status}}
kubectl get [(-o|--output=)json|yaml|template|...] <resource> [<id>]
// List all replication controllers and services together in ps output format.
$ kubectl get rc,services
```

### Options

Expand Down
31 changes: 18 additions & 13 deletions docs/kubectl-label.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,31 @@ Update the labels on a resource

### Synopsis

```
Update the labels on a resource.
If --overwrite is true, then existing labels can be overwritten, otherwise attempting to overwrite a label will result in an error.
If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used.
```

Examples:
// Update pod 'foo' with the label 'unhealthy' and the value 'true'.
$ kubectl label pods foo unhealthy=true
kubectl label [--overwrite] <resource> <name> <key-1>=<val-1> ... <key-n>=<val-n> [--resource-version=<version>]

// Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value.
$ kubectl label --overwrite pods foo status=unhealthy

// Update pod 'foo' only if the resource is unchanged from version 1.
$ kubectl label pods foo status=unhealthy --resource-version=1

// Update pod 'foo' by removing a label named 'bar' if it exists.
// Does not require the --overwrite flag.
$ kubectl label pods foo bar-
### Examples

kubectl label [--overwrite] <resource> <name> <key-1>=<val-1> ... <key-n>=<val-n> [--resource-version=<version>]
```
// Update pod 'foo' with the label 'unhealthy' and the value 'true'.
$ kubectl label pods foo unhealthy=true
// Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value.
$ kubectl label --overwrite pods foo status=unhealthy
// Update pod 'foo' only if the resource is unchanged from version 1.
$ kubectl label pods foo status=unhealthy --resource-version=1
// Update pod 'foo' by removing a label named 'bar' if it exists.
// Does not require the --overwrite flag.
$ kubectl label pods foo bar-
```

### Options

Expand Down
16 changes: 10 additions & 6 deletions docs/kubectl-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@ Print the logs for a container in a pod.

### Synopsis

```
Print the logs for a container in a pod. If the pod has only one container, the container name is optional.
```

Examples:
kubectl log [-f] <pod> [<container>]

// Returns snapshot of ruby-container logs from pod 123456-7890.
$ kubectl log 123456-7890 ruby-container
### Examples

// Starts streaming of ruby-container logs from pod 123456-7890.
$ kubectl log -f 123456-7890 ruby-container
```
// Returns snapshot of ruby-container logs from pod 123456-7890.
$ kubectl log 123456-7890 ruby-container
kubectl log [-f] <pod> [<container>]
// Starts streaming of ruby-container logs from pod 123456-7890.
$ kubectl log -f 123456-7890 ruby-container
```

### Options

Expand Down
Loading

0 comments on commit 421da20

Please sign in to comment.