From ded5417580ce20a4c435b350075819106cf5df15 Mon Sep 17 00:00:00 2001 From: Janet Kuo Date: Thu, 12 May 2016 15:35:22 -0700 Subject: [PATCH] Change RC to deployments in multi-container and simple-nginx docs --- docs/user-guide/pods/multi-container.md | 19 ++++++++----------- docs/user-guide/simple-nginx.md | 16 +++++++++------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/docs/user-guide/pods/multi-container.md b/docs/user-guide/pods/multi-container.md index 3b4214f111..fe050e4f62 100644 --- a/docs/user-guide/pods/multi-container.md +++ b/docs/user-guide/pods/multi-container.md @@ -15,16 +15,13 @@ Multi-container pods must be created with the `create` command. Properties are passed to the command as a YAML- or JSON-formatted configuration file. The `create` command can be used to create a pod directly, or it can create -a pod or pods through a replication controller. It is highly recommended that +a pod or pods through a `Deployment`. It is highly recommended that you use a -[replication controller](/docs/user-guide/replication-controller/) -to create your pods. The controller watches for failed pods and will start up +[Deployment](/docs/user-guide/deployments/) +to create your pods. It watches for failed pods and will start up new pods as required to maintain the specified number. -For instructions on creating pods with a replication controller, refer to -[Creating replication controllers](/docs/user-guide/replication-controller/operations/). - -If you don't want a replication controller to monitor your pod (e.g. your pod +If you don't want a Deployment to monitor your pod (e.g. your pod is writing non-persistent data which won't survive a restart, or your pod is intended to be very short-lived), you can create a pod directly with the `create` command. @@ -32,12 +29,12 @@ intended to be very short-lived), you can create a pod directly with the ### Using `create` Note: We recommend using a -[replication controller](/docs/user-guide/replication-controller/) +[Deployment](/docs/user-guide/deployments/) to create pods. You should use the instructions below only if you don't want -to create a replication controller. +to create a Deployment. If your pod will contain more than one container, or if you don't want to -create a replication controller to manage your pod, use the +create a Deployment to manage your pod, use the `kubectl create` command and pass a pod specification as a JSON- or YAML-formatted configuration file. @@ -75,7 +72,7 @@ Required fields are: unique within the namespace. * `labels`: Optional. Labels are arbitrary key:value pairs that can be used by - [replication controllers](/docs/user-guide/replication-controller) + [Deployment](/docs/user-guide/deployments/) and [services](/docs/user-guide/services/) for grouping and targeting pods. * `generateName`: Required if `name` is not set. A prefix to use to generate diff --git a/docs/user-guide/simple-nginx.md b/docs/user-guide/simple-nginx.md index 5956f5cac3..d2e928d542 100644 --- a/docs/user-guide/simple-nginx.md +++ b/docs/user-guide/simple-nginx.md @@ -9,7 +9,9 @@ to Kubernetes and running your first containers on the cluster. From this point onwards, it is assumed that `kubectl` is on your path from one of the getting started guides. -The [`kubectl run`](/docs/user-guide/kubectl/kubectl_run) line below will create two [nginx](https://registry.hub.docker.com/_/nginx/) [pods](/docs/user-guide/pods) listening on port 80. It will also create a [replication controller](/docs/user-guide/replication-controller) named `my-nginx` to ensure that there are always two pods running. +The [`kubectl run`](/docs/user-guide/kubectl/kubectl_run) line below will create a [`Deployment`](/docs/user-guide/deployments) named `my-nginx`, and +two [nginx](https://registry.hub.docker.com/_/nginx/) [pods](/docs/user-guide/pods) listening on port 80. The `Deployment` will ensure that there are +always exactly two pod running as specified in its spec. ```shell kubectl run my-nginx --image=nginx --replicas=2 --port=80 @@ -21,16 +23,16 @@ Once the pods are created, you can list them to see what is up and running: kubectl get pods ``` -You can also see the replication controller that was created: +You can also see the Deployment that was created: ```shell -kubectl get rc +kubectl get deployments ``` -To stop the two replicated containers, delete the replication controller: +To stop the two replicated containers, delete the Deployment: ```shell -kubectl delete rc my-nginx +kubectl delete deployment my-nginx ``` ### Exposing your pods to the internet. @@ -39,7 +41,7 @@ On some platforms (for example Google Compute Engine) the kubectl command can in to do this run: ```shell -kubectl expose rc my-nginx --port=80 --type=LoadBalancer +kubectl expose deployment my-nginx --port=80 --type=LoadBalancer ``` This should print the service that has been created, and map an external IP address to the service. Where to find this external IP address will depend on the environment you run in. For instance, for Google Compute Engine the external IP address is listed as part of the newly created service and can be retrieved by running @@ -53,4 +55,4 @@ In order to access your nginx landing page, you also have to make sure that traf ### Next: Configuration files Most people will eventually want to use declarative configuration files for creating/modifying their applications. A [simplified introduction](/docs/user-guide/deploying-applications/) -is given in a different document. \ No newline at end of file +is given in a different document.