Merge pull request #11170 from mikedanese/kubectl-move

move kubectl generated man docs to docs/user-guide/kubectl
This commit is contained in:
Tim Hockin 2015-07-13 13:22:21 -07:00
commit 0e59dfabd0
48 changed files with 90 additions and 91 deletions

View File

@ -24,7 +24,7 @@ certainly want the docs that go with that version.</h1>
programs that access the kubernetes API, write plugins or extensions, or programs that access the kubernetes API, write plugins or extensions, or
modify the core code of kubernetes. modify the core code of kubernetes.
* The [Kubectl Command Line Interface](kubectl.md) is a detailed reference on * The [Kubectl Command Line Interface](user-guide/kubectl/kubectl.md) is a detailed reference on
the `kubectl` CLI. the `kubectl` CLI.
* The [API object documentation](http://kubernetes.io/third_party/swagger-ui/) * The [API object documentation](http://kubernetes.io/third_party/swagger-ui/)

View File

@ -33,7 +33,7 @@ kubectl config view
``` ```
Many of the [examples](../examples/) provide an introduction to using Many of the [examples](../examples/) provide an introduction to using
kubectl and complete documentation is found in the [kubectl manual](../docs/kubectl.md). kubectl and complete documentation is found in the [kubectl manual](../docs/user-guide/kubectl/kubectl.md).
### <a name="kubectlproxy"</a>Directly accessing the REST API ### <a name="kubectlproxy"</a>Directly accessing the REST API
Kubectl handles locating and authenticating to the apiserver. Kubectl handles locating and authenticating to the apiserver.
@ -58,7 +58,7 @@ Run it like this:
``` ```
kubectl proxy --port=8080 & kubectl proxy --port=8080 &
``` ```
See [kubectl proxy](../docs/kubectl_proxy.md) for more details. See [kubectl proxy](../docs/user-guide/kubectl/kubectl_proxy.md) for more details.
Then you can explore the API with curl, wget, or a browser, like so: Then you can explore the API with curl, wget, or a browser, like so:
``` ```
@ -145,7 +145,7 @@ You have several options for connecting to nodes, pods and services from outside
- Access services through public IPs. - Access services through public IPs.
- Use a service with type `NodePort` or `LoadBalancer` to make the service reachable outside - Use a service with type `NodePort` or `LoadBalancer` to make the service reachable outside
the cluster. See the [services](../docs/services.md) and the cluster. See the [services](../docs/services.md) and
[kubectl expose](../docs/kubectl_expose.md) documentation. [kubectl expose](../docs/user-guide/kubectl/kubectl_expose.md) documentation.
- Depending on your cluster environment, this may just expose the service to your corporate network, - Depending on your cluster environment, this may just expose the service to your corporate network,
or it may expose it to the internet. Think about whether the service being exposed is secure. or it may expose it to the internet. Think about whether the service being exposed is secure.
Does it do its own authentication? Does it do its own authentication?
@ -161,7 +161,7 @@ You have several options for connecting to nodes, pods and services from outside
- Only works for HTTP/HTTPS. - Only works for HTTP/HTTPS.
- Described [here](#apiserverproxy). - Described [here](#apiserverproxy).
- Access from a node or pod in the cluster. - Access from a node or pod in the cluster.
- Run a pod, and then connect to a shell in it using [kubectl exec](../docs/kubectl_exec.md). - Run a pod, and then connect to a shell in it using [kubectl exec](../docs/user-guide/kubectl/kubectl_exec.md).
Connect to other nodes, pods, and services from that shell. Connect to other nodes, pods, and services from that shell.
- Some clusters may allow you to ssh to a node in the cluster. From there you may be able to - Some clusters may allow you to ssh to a node in the cluster. From there you may be able to
access cluster services. This is a non-standard method, and will work on some clusters but access cluster services. This is a non-standard method, and will work on some clusters but

View File

@ -22,7 +22,7 @@ Complete API details are documented via [Swagger](http://swagger.io/). The Kuber
Remote access to the API is discussed in the [access doc](accessing_the_api.md). Remote access to the API is discussed in the [access doc](accessing_the_api.md).
The Kubernetes API also serves as the foundation for the declarative configuration schema for the system. The [Kubectl](kubectl.md) command-line tool can be used to create, update, delete, and get API objects. The Kubernetes API also serves as the foundation for the declarative configuration schema for the system. The [Kubectl](user-guide/kubectl/kubectl.md) command-line tool can be used to create, update, delete, and get API objects.
Kubernetes also stores its serialized state (currently in [etcd](https://coreos.com/docs/distributed-configuration/getting-started-with-etcd/)) in terms of the API resources. Kubernetes also stores its serialized state (currently in [etcd](https://coreos.com/docs/distributed-configuration/getting-started-with-etcd/)) in terms of the API resources.

View File

@ -95,7 +95,7 @@ The next few steps will show you:
The cluster startup script will leave you with a running cluster and a ```kubernetes``` directory on your workstation. The cluster startup script will leave you with a running cluster and a ```kubernetes``` directory on your workstation.
The next step is to make sure the `kubectl` tool is in your path. The next step is to make sure the `kubectl` tool is in your path.
The [kubectl](../kubectl.md) tool controls the Kubernetes cluster manager. It lets you inspect your cluster resources, create, delete, and update components, and much more. The [kubectl](../user-guide/kubectl/kubectl.md) tool controls the Kubernetes cluster manager. It lets you inspect your cluster resources, create, delete, and update components, and much more.
You will use it to look at your new cluster and bring up example apps. You will use it to look at your new cluster and bring up example apps.
Add the appropriate binary folder to your ```PATH``` to access kubectl: Add the appropriate binary folder to your ```PATH``` to access kubectl:

View File

@ -73,7 +73,7 @@ steps that existing cluster setup scripts are making.
### Learning ### Learning
1. You should be familiar with using Kubernetes already. We suggest you set 1. You should be familiar with using Kubernetes already. We suggest you set
up a temporary cluster by following one of the other Getting Started Guides. up a temporary cluster by following one of the other Getting Started Guides.
This will help you become familiar with the CLI ([kubectl](../kubectl.md)) and concepts ([pods](../pods.md), [services](../services.md), etc.) first. This will help you become familiar with the CLI ([kubectl](../user-guide/kubectl/kubectl.md)) and concepts ([pods](../pods.md), [services](../services.md), etc.) first.
1. You should have `kubectl` installed on your desktop. This will happen as a side 1. You should have `kubectl` installed on your desktop. This will happen as a side
effect of completing one of the other Getting Started Guides. effect of completing one of the other Getting Started Guides.

View File

@ -97,7 +97,7 @@ The rules for loading and merging the kubeconfig files are straightforward, but
## Manipulation of kubeconfig via `kubectl config <subcommand>` ## Manipulation of kubeconfig via `kubectl config <subcommand>`
In order to more easily manipulate kubeconfig files, there are a series of subcommands to `kubectl config` to help. In order to more easily manipulate kubeconfig files, there are a series of subcommands to `kubectl config` to help.
See [kubectl_config.md](kubectl_config.md) for help. See [user-guide/kubectl/kubectl_config.md](user-guide/kubectl/kubectl_config.md) for help.
### Example ### Example
``` ```

View File

@ -34,7 +34,7 @@ Other details:
* [API](api.md) * [API](api.md)
* [Client libraries](client-libraries.md) * [Client libraries](client-libraries.md)
* [Command-line interface](kubectl.md) * [Command-line interface](user-guide/kubectl/kubectl.md)
* [UI](ui.md) * [UI](ui.md)
* [Images and registries](images.md) * [Images and registries](images.md)
* [Container environment](container-environment.md) * [Container environment](container-environment.md)

View File

@ -42,7 +42,7 @@ Note that replication controllers may themselves have labels and would generally
Pods may be removed from a replication controller's target set by changing their labels. This technique may be used to remove pods from service for debugging, data recovery, etc. Pods that are removed in this way will be replaced automatically (assuming that the number of replicas is not also changed). Pods may be removed from a replication controller's target set by changing their labels. This technique may be used to remove pods from service for debugging, data recovery, etc. Pods that are removed in this way will be replaced automatically (assuming that the number of replicas is not also changed).
Similarly, deleting a replication controller does not affect the pods it created. Its `replicas` field must first be set to 0 in order to delete the pods controlled. (Note that the client tool, kubectl, provides a single operation, [stop](kubectl_stop.md) to delete both the replication controller and the pods it controls. However, there is no such operation in the API at the moment) Similarly, deleting a replication controller does not affect the pods it created. Its `replicas` field must first be set to 0 in order to delete the pods controlled. (Note that the client tool, kubectl, provides a single operation, [stop](user-guide/kubectl/kubectl_stop.md) to delete both the replication controller and the pods it controls. However, there is no such operation in the API at the moment)
## Responsibilities of the replication controller ## Responsibilities of the replication controller
@ -73,7 +73,7 @@ Ideally, the rolling update controller would take application readiness into acc
The two replication controllers would need to create pods with at least one differentiating label, such as the image tag of the primary container of the pod, since it is typically image updates that motivate rolling updates. The two replication controllers would need to create pods with at least one differentiating label, such as the image tag of the primary container of the pod, since it is typically image updates that motivate rolling updates.
Rolling update is implemented in the client tool Rolling update is implemented in the client tool
[kubectl](kubectl_rolling-update.md) [kubectl](user-guide/kubectl/kubectl_rolling-update.md)
### Multiple release tracks ### Multiple release tracks

View File

@ -66,7 +66,7 @@ allowed. The values are arbitrary data, encoded using base64. The values of
username and password in the example above, before base64 encoding, username and password in the example above, before base64 encoding,
are `value-1` and `value-2`, respectively, with carriage return and newline characters at the end. are `value-1` and `value-2`, respectively, with carriage return and newline characters at the end.
Create the secret using [`kubectl create`](kubectl_create.md). Create the secret using [`kubectl create`](user-guide/kubectl/kubectl_create.md).
Once the secret is created, you can: Once the secret is created, you can:
- create pods that automatically use it via a [Service Account](service_accounts.md). - create pods that automatically use it via a [Service Account](service_accounts.md).
@ -184,7 +184,7 @@ change, even if the secret resource is modified. To change the secret used,
the original pod must be deleted, and a new pod (perhaps with an identical the original pod must be deleted, and a new pod (perhaps with an identical
`PodSpec`) must be created. Therefore, updating a secret follows the same `PodSpec`) must be created. Therefore, updating a secret follows the same
workflow as deploying a new container image. The `kubectl rolling-update` workflow as deploying a new container image. The `kubectl rolling-update`
command can be used ([man page](kubectl_rolling-update.md)). command can be used ([man page](user-guide/kubectl/kubectl_rolling-update.md)).
The [`resourceVersion`](api-conventions.md#concurrency-control-and-consistency) The [`resourceVersion`](api-conventions.md#concurrency-control-and-consistency)
of the secret is not specified when it is referenced. of the secret is not specified when it is referenced.

View File

@ -60,7 +60,7 @@ kubernetes API, or to contribute directly to the kubernetes project.
* **Kubernetes Web Interface** ([ui.md](ui.md)): Accessing the Kubernetes * **Kubernetes Web Interface** ([ui.md](ui.md)): Accessing the Kubernetes
web user interface. web user interface.
* **Kubectl Command Line Interface** ([kubectl.md](kubectl.md)): * **Kubectl Command Line Interface** ([user-guide/kubectl/kubectl.md](user-guide/kubectl/kubectl.md)):
The `kubectl` command line reference. The `kubectl` command line reference.
* **Sharing Cluster Access** ([sharing-clusters.md](sharing-clusters.md)): * **Sharing Cluster Access** ([sharing-clusters.md](sharing-clusters.md)):

View File

@ -13,7 +13,7 @@ certainly want the docs that go with that version.</h1>
<!-- END MUNGE: UNVERSIONED_WARNING --> <!-- END MUNGE: UNVERSIONED_WARNING -->
#Connecting to applications: kubectl port-forward #Connecting to applications: kubectl port-forward
kubectl port-forward forwards connections to a local port to a port on a pod. Its man page is available [here](../../docs/kubectl_port-forward.md). Compared to [kubectl proxy](../../docs/accessing-the-cluster.md#using-kubectl-proxy), `kubectl port-forward` is more generic as it can forward TCP traffic while `kubectl proxy` can only forward HTTP traffic. This guide demonstrates how to use `kubectl port-forward` to connect to a Redis database, which may be useful for database debugging. kubectl port-forward forwards connections to a local port to a port on a pod. Its man page is available [here](../../docs/user-guide/kubectl/kubectl_port-forward.md). Compared to [kubectl proxy](../../docs/accessing-the-cluster.md#using-kubectl-proxy), `kubectl port-forward` is more generic as it can forward TCP traffic while `kubectl proxy` can only forward HTTP traffic. This guide demonstrates how to use `kubectl port-forward` to connect to a Redis database, which may be useful for database debugging.
## Creating a Redis master ## Creating a Redis master
@ -51,8 +51,4 @@ PONG
``` ```
Now one can debug the database from the local workstation. Now one can debug the database from the local workstation.
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/connecting-to-applications-2.md?pixel)]()
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/connecting-to-applications-port-forward.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/connecting-to-applications-port-forward.md?pixel)]()

View File

@ -97,7 +97,7 @@ CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS APP
my-nginx nginx nginx app=nginx 2 nginx my-nginx nginx nginx app=nginx 2 nginx
``` ```
More importantly, the pod templates labels are used to create a [`selector`](../../docs/labels.md#label-selectors) that will match pods carrying those labels. You can see this field by requesting it using the [Go template output format of `kubectl get`](../../docs/kubectl_get.md): More importantly, the pod templates labels are used to create a [`selector`](../../docs/labels.md#label-selectors) that will match pods carrying those labels. You can see this field by requesting it using the [Go template output format of `kubectl get`](../../docs/user-guide/kubectl/kubectl_get.md):
```bash ```bash
$ kubectl get rc my-nginx -o template --template="{{.spec.selector}}" $ kubectl get rc my-nginx -o template --template="{{.spec.selector}}"
map[app:nginx] map[app:nginx]

View File

@ -80,6 +80,6 @@ kubectl
* [kubectl stop](kubectl_stop.md) - Gracefully shut down a resource by name or filename. * [kubectl stop](kubectl_stop.md) - Gracefully shut down a resource by name or filename.
* [kubectl version](kubectl_version.md) - Print the client and server version information. * [kubectl version](kubectl_version.md) - Print the client and server version information.
###### Auto generated by spf13/cobra at 2015-07-07 23:45:47.079572585 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.04001576 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl.md?pixel)]()

View File

@ -63,6 +63,6 @@ kubectl api-versions
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.231770799 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.03979762 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_api-versions.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_api-versions.md?pixel)]()

View File

@ -63,6 +63,6 @@ kubectl cluster-info
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.230831561 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.039702166 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_cluster-info.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_cluster-info.md?pixel)]()

View File

@ -76,6 +76,6 @@ kubectl config SUBCOMMAND
* [kubectl config use-context](kubectl_config_use-context.md) - Sets the current-context in a kubeconfig file * [kubectl config use-context](kubectl_config_use-context.md) - Sets the current-context in a kubeconfig file
* [kubectl config view](kubectl_config_view.md) - displays Merged kubeconfig settings or a specified kubeconfig file. * [kubectl config view](kubectl_config_view.md) - displays Merged kubeconfig settings or a specified kubeconfig file.
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.229842268 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.039608227 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_config.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config.md?pixel)]()

View File

@ -78,6 +78,6 @@ $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true
### SEE ALSO ### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.222182293 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.038569042 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_config_set-cluster.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set-cluster.md?pixel)]()

View File

@ -71,6 +71,6 @@ $ kubectl config set-context gce --user=cluster-admin
### SEE ALSO ### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.225463229 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.039201244 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_config_set-context.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set-context.md?pixel)]()

View File

@ -91,6 +91,6 @@ $ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admi
### SEE ALSO ### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-06-22 20:33:35.307768646 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.038679654 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_config_set-credentials.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set-credentials.md?pixel)]()

View File

@ -65,6 +65,6 @@ kubectl config set PROPERTY_NAME PROPERTY_VALUE
### SEE ALSO ### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.226564217 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.039309985 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_config_set.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set.md?pixel)]()

View File

@ -64,6 +64,6 @@ kubectl config unset PROPERTY_NAME
### SEE ALSO ### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.228039789 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.03940649 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_config_unset.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_unset.md?pixel)]()

View File

@ -63,6 +63,6 @@ kubectl config use-context CONTEXT_NAME
### SEE ALSO ### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.228948447 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.03950086 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_config_use-context.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_use-context.md?pixel)]()

View File

@ -83,6 +83,6 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2
### SEE ALSO ### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-06-30 16:51:25.60964036 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.03846839 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_config_view.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_view.md?pixel)]()

View File

@ -76,6 +76,6 @@ $ cat pod.json | kubectl create -f -
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.178299587 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.036742691 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_create.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create.md?pixel)]()

View File

@ -98,6 +98,6 @@ $ kubectl delete pods --all
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-07-01 07:34:21.243108535 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.037057308 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_delete.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_delete.md?pixel)]()

View File

@ -89,6 +89,6 @@ $ kubectl describe pods frontend
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-07-07 23:45:47.075376625 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.036639846 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_describe.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_describe.md?pixel)]()

View File

@ -81,6 +81,6 @@ $ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-06-24 20:27:28.756021646 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.037624471 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_exec.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_exec.md?pixel)]()

View File

@ -97,6 +97,6 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-06-30 16:51:25.609406207 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.038219725 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_expose.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_expose.md?pixel)]()

View File

@ -105,6 +105,6 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-06-30 18:05:17.889608636 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.036494619 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_get.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_get.md?pixel)]()

View File

@ -95,6 +95,6 @@ $ kubectl label pods foo bar-
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-06-30 16:51:25.609525621 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.038346279 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_label.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_label.md?pixel)]()

View File

@ -80,6 +80,6 @@ $ kubectl logs -f 123456-7890 ruby-container
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-06-30 16:27:32.981507725 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.03725996 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_logs.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_logs.md?pixel)]()

View File

@ -66,6 +66,6 @@ kubectl namespace [namespace]
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.181662849 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.037159721 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_namespace.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_namespace.md?pixel)]()

View File

@ -76,4 +76,4 @@ kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}'
###### Auto generated by spf13/cobra at 2015-07-13 16:38:17.586247279 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 16:38:17.586247279 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_patch.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_patch.md?pixel)]()

View File

@ -81,6 +81,6 @@ $ kubectl port-forward -p mypod 0:5000
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-07-08 07:53:42.570511034 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.037733037 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_port-forward.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_port-forward.md?pixel)]()

View File

@ -98,6 +98,6 @@ $ kubectl proxy --api-prefix=/k8s-api
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-06-23 19:00:28.69764897 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.037848292 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_proxy.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_proxy.md?pixel)]()

View File

@ -83,6 +83,6 @@ kubectl replace --force -f pod.json
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-06-29 00:11:27.040756424 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.036845595 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_replace.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_replace.md?pixel)]()

View File

@ -97,6 +97,6 @@ $ kubectl rolling-update frontend --image=image:v2
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-06-30 16:51:25.608180277 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.037393307 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_rolling-update.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rolling-update.md?pixel)]()

View File

@ -92,6 +92,6 @@ $ kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { .
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-06-30 16:51:25.609119035 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.037967503 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_run.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_run.md?pixel)]()

View File

@ -81,6 +81,6 @@ $ kubectl scale --current-replicas=2 --replicas=3 replicationcontrollers foo
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-07-01 07:34:21.243720199 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.037506001 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_scale.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_scale.md?pixel)]()

View File

@ -88,6 +88,6 @@ $ kubectl stop -f path/to/resources
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-07-01 07:34:21.245187967 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.038086735 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_stop.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_stop.md?pixel)]()

View File

@ -64,6 +64,6 @@ kubectl version
### SEE ALSO ### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.232741611 +0000 UTC ###### Auto generated by spf13/cobra at 2015-07-13 17:48:54.039889101 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_version.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_version.md?pixel)]()

View File

@ -215,7 +215,7 @@ my-nginx-o0ef1 1/1 Running 0 1h
At some point, youll eventually need to update your deployed application, typically by specifying a new image or image tag, as in the canary deployment scenario above. `kubectl` supports several update operations, each of which is applicable to different scenarios. At some point, youll eventually need to update your deployed application, typically by specifying a new image or image tag, as in the canary deployment scenario above. `kubectl` supports several update operations, each of which is applicable to different scenarios.
To update a service without an outage, `kubectl` supports what is called [“rolling update”](../../docs/kubectl_rolling-update.md), which updates one pod at a time, rather than taking down the entire service at the same time. To update a service without an outage, `kubectl` supports what is called [“rolling update”](../../docs/user-guide/kubectl/kubectl_rolling-update.md), which updates one pod at a time, rather than taking down the entire service at the same time.
Lets say you were running version 1.7.9 of nginx: Lets say you were running version 1.7.9 of nginx:
```yaml ```yaml

View File

@ -14,7 +14,7 @@ certainly want the docs that go with that version.</h1>
<!-- END MUNGE: UNVERSIONED_WARNING --> <!-- END MUNGE: UNVERSIONED_WARNING -->
# Kubernetes User Guide: Managing Applications: Prerequisites # Kubernetes User Guide: Managing Applications: Prerequisites
To deploy and manage applications on Kubernetes, youll use the Kubernetes command-line tool, [kubectl](../../docs/kubectl.md). It can be found in the release tar bundle, or can be built from source from github. Ensure that it is executable and in your path. To deploy and manage applications on Kubernetes, youll use the Kubernetes command-line tool, [kubectl](../../docs/user-guide/kubectl/kubectl.md). It can be found in the release tar bundle, or can be built from source from github. Ensure that it is executable and in your path.
In order for kubectl to find and access the Kubernetes cluster, it needs a [kubeconfig file](../../docs/kubeconfig-file.md), which is created automatically when creating a cluster using kube-up.sh (see the [getting started guides](../../docs/getting-started-guides/) for more about creating clusters). If you need access to a cluster you didnt create, see the [Sharing Cluster Access document](../../docs/sharing-clusters.md). In order for kubectl to find and access the Kubernetes cluster, it needs a [kubeconfig file](../../docs/kubeconfig-file.md), which is created automatically when creating a cluster using kube-up.sh (see the [getting started guides](../../docs/getting-started-guides/) for more about creating clusters). If you need access to a cluster you didnt create, see the [Sharing Cluster Access document](../../docs/sharing-clusters.md).

View File

@ -20,7 +20,7 @@ This guide will help you get oriented to Kubernetes and running your first conta
Once your application is packaged into a container and pushed to an image registry, youre ready to deploy it to Kubernetes. Once your application is packaged into a container and pushed to an image registry, youre ready to deploy it to Kubernetes.
For example, [nginx](http://wiki.nginx.org/Main) is a popular HTTP server, with a [pre-built container on Docker hub](https://registry.hub.docker.com/_/nginx/). The [`kubectl run`](../../docs/kubectl_run.md) command below will create two nginx replicas, listening on port 80. For example, [nginx](http://wiki.nginx.org/Main) is a popular HTTP server, with a [pre-built container on Docker hub](https://registry.hub.docker.com/_/nginx/). The [`kubectl run`](../../docs/user-guide/kubectl/kubectl_run.md) command below will create two nginx replicas, listening on port 80.
```bash ```bash
$ kubectl run my-nginx --image=nginx --replicas=2 --port=80 $ kubectl run my-nginx --image=nginx --replicas=2 --port=80

10
hack/lib/util.sh Normal file → Executable file
View File

@ -123,8 +123,10 @@ kube::util::wait-for-jobs() {
# that match $3, copy is skipped. # that match $3, copy is skipped.
kube::util::gen-doc() { kube::util::gen-doc() {
local cmd="$1" local cmd="$1"
local dest="$2" local base_dest="$(realpath $2)/"
local skipprefix="${3:-}" local relative_doc_dest="$3"
local dest="${base_dest}${relative_doc_dest}"
local skipprefix="${4:-}"
# We do this in a tmpdir in case the dest has other non-autogenned files # We do this in a tmpdir in case the dest has other non-autogenned files
# We don't want to include them in the list of gen'd files # We don't want to include them in the list of gen'd files
@ -139,7 +141,7 @@ kube::util::gen-doc() {
# Add analytics link to generated .md files # Add analytics link to generated .md files
if [[ "${file}" == *.md ]]; then if [[ "${file}" == *.md ]]; then
local link path local link path
path=$(basename "$dest")/${file} path="$relative_doc_dest$file"
link=$(kube::util::analytics-link "${path}") link=$(kube::util::analytics-link "${path}")
echo -e "\n${link}" >> "${tmpdir}/${file}" echo -e "\n${link}" >> "${tmpdir}/${file}"
fi fi
@ -192,7 +194,7 @@ kube::util::gen-analytics() {
-not -path "${path}/Godeps/*" \ -not -path "${path}/Godeps/*" \
-not -path "${path}/third_party/*" \ -not -path "${path}/third_party/*" \
-not -path "${path}/_output/*" \ -not -path "${path}/_output/*" \
-not -path "${path}/docs/kubectl*" )) -not -path "${path}/docs/user-guide/kubectl/kubectl*" ))
for f in "${mdfiles[@]}"; do for f in "${mdfiles[@]}"; do
link=$(kube::util::analytics-link "${f#${path}/}") link=$(kube::util::analytics-link "${f#${path}/}")
if grep -q -F -x "${link}" "${f}"; then if grep -q -F -x "${link}" "${f}"; then

View File

@ -40,9 +40,9 @@ if [[ ! -x "$gendocs" || ! -x "$genman" || ! -x "$genbashcomp" || ! -x "$mungedo
exit 1 exit 1
fi fi
kube::util::gen-doc "${gendocs}" "${KUBE_ROOT}/docs/" '###### Auto generated by spf13/cobra' kube::util::gen-doc "${gendocs}" "${KUBE_ROOT}" "docs/user-guide/kubectl/" '###### Auto generated by spf13/cobra'
kube::util::gen-doc "${genman}" "${KUBE_ROOT}/docs/man/man1" kube::util::gen-doc "${genman}" "${KUBE_ROOT}" "docs/man/man1"
kube::util::gen-doc "${genbashcomp}" "${KUBE_ROOT}/contrib/completions/bash/" kube::util::gen-doc "${genbashcomp}" "${KUBE_ROOT}" "contrib/completions/bash/"
kube::util::gen-analytics "${KUBE_ROOT}" kube::util::gen-analytics "${KUBE_ROOT}"
"${mungedocs}" "--root-dir=${KUBE_ROOT}/docs/" "${mungedocs}" "--root-dir=${KUBE_ROOT}/docs/"

View File

@ -59,8 +59,9 @@ if [[ $ret -eq 2 ]]; then
exit 1 exit 1
fi fi
kube::util::gen-doc "${genman}" "${TMP_DOCROOT}/man/man1/" kube::util::gen-doc "${genman}" "${_tmp}" "docs/man/man1/"
kube::util::gen-doc "${gendocs}" "${TMP_DOCROOT}" '###### Auto generated by spf13/cobra' kube::util::gen-doc "${gendocs}" "${_tmp}" "docs/user-guide/kubectl/" '###### Auto generated by spf13/cobra'
echo "diffing ${DOCROOT} against freshly generated docs" echo "diffing ${DOCROOT} against freshly generated docs"
ret=0 ret=0
diff -Naupr "${DOCROOT}" "${TMP_DOCROOT}" || ret=$? diff -Naupr "${DOCROOT}" "${TMP_DOCROOT}" || ret=$?
@ -82,7 +83,7 @@ fi
COMPROOT="${KUBE_ROOT}/contrib/completions" COMPROOT="${KUBE_ROOT}/contrib/completions"
TMP_COMPROOT="${KUBE_ROOT}/contrib/completions_tmp" TMP_COMPROOT="${KUBE_ROOT}/contrib/completions_tmp"
cp -a "${COMPROOT}" "${TMP_COMPROOT}" cp -a "${COMPROOT}" "${TMP_COMPROOT}"
kube::util::gen-doc "${genbashcomp}" "${TMP_COMPROOT}/bash/" kube::util::gen-doc "${genbashcomp}" "${TMP_COMPROOT}" "bash/"
ret=0 ret=0
diff -Naupr "${COMPROOT}" "${TMP_COMPROOT}" || ret=$? diff -Naupr "${COMPROOT}" "${TMP_COMPROOT}" || ret=$?
rm -rf ${TMP_COMPROOT} rm -rf ${TMP_COMPROOT}