diff --git a/docs/README.md b/docs/README.md index bd3306ebbc1..3059f73df1d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -24,7 +24,7 @@ certainly want the docs that go with that version. programs that access the kubernetes API, write plugins or extensions, or 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 [API object documentation](http://kubernetes.io/third_party/swagger-ui/) diff --git a/docs/accessing-the-cluster.md b/docs/accessing-the-cluster.md index 28a2e9908fc..a5169d6e427 100644 --- a/docs/accessing-the-cluster.md +++ b/docs/accessing-the-cluster.md @@ -33,7 +33,7 @@ kubectl config view ``` 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). ### Directly accessing the REST API Kubectl handles locating and authenticating to the apiserver. @@ -58,7 +58,7 @@ Run it like this: ``` 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: ``` @@ -145,7 +145,7 @@ You have several options for connecting to nodes, pods and services from outside - Access services through public IPs. - Use a service with type `NodePort` or `LoadBalancer` to make the service reachable outside 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, or it may expose it to the internet. Think about whether the service being exposed is secure. 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. - Described [here](#apiserverproxy). - 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. - 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 diff --git a/docs/api.md b/docs/api.md index 3acc558614c..0fb8bbdfffa 100644 --- a/docs/api.md +++ b/docs/api.md @@ -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). -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. diff --git a/docs/getting-started-guides/gce.md b/docs/getting-started-guides/gce.md index f5d3e1b5188..79085de7647 100644 --- a/docs/getting-started-guides/gce.md +++ b/docs/getting-started-guides/gce.md @@ -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 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. Add the appropriate binary folder to your ```PATH``` to access kubectl: diff --git a/docs/getting-started-guides/scratch.md b/docs/getting-started-guides/scratch.md index 412a20dff69..4635e26c193 100644 --- a/docs/getting-started-guides/scratch.md +++ b/docs/getting-started-guides/scratch.md @@ -73,7 +73,7 @@ steps that existing cluster setup scripts are making. ### Learning 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. - 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 effect of completing one of the other Getting Started Guides. diff --git a/docs/kubeconfig-file.md b/docs/kubeconfig-file.md index f22f6080766..e9238a9c44b 100644 --- a/docs/kubeconfig-file.md +++ b/docs/kubeconfig-file.md @@ -97,7 +97,7 @@ The rules for loading and merging the kubeconfig files are straightforward, but ## Manipulation of kubeconfig via `kubectl config ` 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 ``` diff --git a/docs/overview.md b/docs/overview.md index 6fb6c529a0b..a814c9e0cb9 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -34,7 +34,7 @@ Other details: * [API](api.md) * [Client libraries](client-libraries.md) -* [Command-line interface](kubectl.md) +* [Command-line interface](user-guide/kubectl/kubectl.md) * [UI](ui.md) * [Images and registries](images.md) * [Container environment](container-environment.md) diff --git a/docs/replication-controller.md b/docs/replication-controller.md index ba3beaea1de..1c6ea5fa0c1 100644 --- a/docs/replication-controller.md +++ b/docs/replication-controller.md @@ -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). -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 @@ -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. Rolling update is implemented in the client tool -[kubectl](kubectl_rolling-update.md) +[kubectl](user-guide/kubectl/kubectl_rolling-update.md) ### Multiple release tracks diff --git a/docs/secrets.md b/docs/secrets.md index 0f2652034b3..19c07c4611d 100644 --- a/docs/secrets.md +++ b/docs/secrets.md @@ -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, 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: - 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 `PodSpec`) must be created. Therefore, updating a secret follows the same 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) of the secret is not specified when it is referenced. diff --git a/docs/user-guide.md b/docs/user-guide.md index 021cf19d23a..717f9b0f072 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -60,7 +60,7 @@ kubernetes API, or to contribute directly to the kubernetes project. * **Kubernetes Web Interface** ([ui.md](ui.md)): Accessing the Kubernetes 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. * **Sharing Cluster Access** ([sharing-clusters.md](sharing-clusters.md)): diff --git a/docs/user-guide/connecting-to-applications-port-forward.md b/docs/user-guide/connecting-to-applications-port-forward.md index 8880c8bbdfc..17c92a82823 100644 --- a/docs/user-guide/connecting-to-applications-port-forward.md +++ b/docs/user-guide/connecting-to-applications-port-forward.md @@ -13,7 +13,7 @@ certainly want the docs that go with that version. #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 @@ -51,8 +51,4 @@ PONG ``` 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)]() diff --git a/docs/user-guide/deploying-applications.md b/docs/user-guide/deploying-applications.md index faf9c8b46da..079f387354e 100644 --- a/docs/user-guide/deploying-applications.md +++ b/docs/user-guide/deploying-applications.md @@ -97,7 +97,7 @@ CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS APP my-nginx nginx nginx app=nginx 2 nginx ``` -More importantly, the pod template’s 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 template’s 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 $ kubectl get rc my-nginx -o template --template="{{.spec.selector}}" map[app:nginx] diff --git a/docs/user-guide/managing-deployments.md b/docs/user-guide/managing-deployments.md index e44f89c61b9..351a2cfecb3 100644 --- a/docs/user-guide/managing-deployments.md +++ b/docs/user-guide/managing-deployments.md @@ -215,7 +215,7 @@ my-nginx-o0ef1 1/1 Running 0 1h At some point, you’ll 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. Let’s say you were running version 1.7.9 of nginx: ```yaml diff --git a/docs/user-guide/prereqs.md b/docs/user-guide/prereqs.md index 17f9dd4f81c..36a978bb610 100644 --- a/docs/user-guide/prereqs.md +++ b/docs/user-guide/prereqs.md @@ -14,7 +14,7 @@ certainly want the docs that go with that version. # Kubernetes User Guide: Managing Applications: Prerequisites -To deploy and manage applications on Kubernetes, you’ll 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, you’ll 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 didn’t create, see the [Sharing Cluster Access document](../../docs/sharing-clusters.md). diff --git a/docs/user-guide/quick-start.md b/docs/user-guide/quick-start.md index 4080d2c027b..e5b53cfff72 100644 --- a/docs/user-guide/quick-start.md +++ b/docs/user-guide/quick-start.md @@ -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, you’re 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 $ kubectl run my-nginx --image=nginx --replicas=2 --port=80