From 70fd7dca04be6ea316d8346f0af23a7cc2d62a05 Mon Sep 17 00:00:00 2001 From: Steve Perry Date: Wed, 6 Jun 2018 12:36:25 -0700 Subject: [PATCH] Move walkthroughs from user-guide to tutorials. (#8933) --- .../deployment-update.yaml | 0 .../walkthrough => tutorials}/deployment.yaml | 0 .../_index.md => tutorials/k8s101.md} | 11 +++++----- .../walkthrough => tutorials}/k8s201.md | 22 +++++++++---------- .../pod-nginx-with-label.yaml | 0 .../walkthrough => tutorials}/pod-nginx.yaml | 0 .../walkthrough => tutorials}/pod-redis.yaml | 0 .../pod-with-http-healthcheck.yaml | 0 .../pod-with-tcp-socket-healthcheck.yaml | 0 .../walkthrough => tutorials}/service.yaml | 0 content/en/docs/user-guide/OWNERS | 5 ----- content/en/docs/user-guide/_index.md | 3 --- content/en/docs/user-guide/walkthrough/OWNERS | 5 ----- static/_redirects | 3 ++- test/examples_test.go | 10 --------- 15 files changed, 18 insertions(+), 41 deletions(-) rename content/en/docs/{user-guide/walkthrough => tutorials}/deployment-update.yaml (100%) rename content/en/docs/{user-guide/walkthrough => tutorials}/deployment.yaml (100%) rename content/en/docs/{user-guide/walkthrough/_index.md => tutorials/k8s101.md} (94%) rename content/en/docs/{user-guide/walkthrough => tutorials}/k8s201.md (88%) rename content/en/docs/{user-guide/walkthrough => tutorials}/pod-nginx-with-label.yaml (100%) rename content/en/docs/{user-guide/walkthrough => tutorials}/pod-nginx.yaml (100%) rename content/en/docs/{user-guide/walkthrough => tutorials}/pod-redis.yaml (100%) rename content/en/docs/{user-guide/walkthrough => tutorials}/pod-with-http-healthcheck.yaml (100%) rename content/en/docs/{user-guide/walkthrough => tutorials}/pod-with-tcp-socket-healthcheck.yaml (100%) rename content/en/docs/{user-guide/walkthrough => tutorials}/service.yaml (100%) delete mode 100644 content/en/docs/user-guide/OWNERS delete mode 100644 content/en/docs/user-guide/_index.md delete mode 100644 content/en/docs/user-guide/walkthrough/OWNERS diff --git a/content/en/docs/user-guide/walkthrough/deployment-update.yaml b/content/en/docs/tutorials/deployment-update.yaml similarity index 100% rename from content/en/docs/user-guide/walkthrough/deployment-update.yaml rename to content/en/docs/tutorials/deployment-update.yaml diff --git a/content/en/docs/user-guide/walkthrough/deployment.yaml b/content/en/docs/tutorials/deployment.yaml similarity index 100% rename from content/en/docs/user-guide/walkthrough/deployment.yaml rename to content/en/docs/tutorials/deployment.yaml diff --git a/content/en/docs/user-guide/walkthrough/_index.md b/content/en/docs/tutorials/k8s101.md similarity index 94% rename from content/en/docs/user-guide/walkthrough/_index.md rename to content/en/docs/tutorials/k8s101.md index 06eaddf238..20b686121f 100644 --- a/content/en/docs/user-guide/walkthrough/_index.md +++ b/content/en/docs/tutorials/k8s101.md @@ -3,7 +3,6 @@ reviewers: - eparis - mikedanese title: Kubernetes 101 -toc_hide: true --- ## Kubectl CLI and Pods @@ -12,7 +11,7 @@ For Kubernetes 101, we will cover kubectl, Pods, Volumes, and multiple container {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} -In order for the kubectl usage examples to work, make sure you have an example directory locally, either from [a release](https://github.com/kubernetes/kubernetes/releases) or the latest `.yaml` files located [here](https://github.com/kubernetes/website/tree/master/content/en/docs/user-guide/walkthrough). +In order for the kubectl usage examples to work, make sure you have an example directory locally, either from [a release](https://github.com/kubernetes/kubernetes/releases) or the latest `.yaml` files located [here](https://github.com/kubernetes/website/tree/master/content/en/docs/tutorials). {{< toc >}} @@ -45,10 +44,10 @@ For more information, see [Kubernetes Design Documents and Proposals](https://gi #### Pod Management -Create a Pod containing an nginx server ([pod-nginx.yaml](/docs/user-guide/walkthrough/pod-nginx.yaml)): +Create a Pod containing an nginx server ([pod-nginx.yaml](/docs/tutorials/pod-nginx.yaml)): ```shell -$ kubectl create -f docs/user-guide/walkthrough/pod-nginx.yaml +$ kubectl create -f docs/tutorials/pod-nginx.yaml ``` List all Pods: @@ -103,7 +102,7 @@ volumeMounts: ``` -Here is an example of Redis Pod definition with a persistent storage volume ([pod-redis.yaml](/docs/user-guide/walkthrough/pod-redis.yaml)): +Here is an example of Redis Pod definition with a persistent storage volume ([pod-redis.yaml](/docs/tutorials/pod-redis.yaml)): {{< code file="pod-redis.yaml" >}} @@ -162,5 +161,5 @@ Finally, we have also introduced an environment variable to the `git-monitor` co ## What's Next? -Continue on to [Kubernetes 201](/docs/user-guide/walkthrough/k8s201/) or +Continue on to [Kubernetes 201](/docs/tutorials/k8s201/) or for a complete application see the [guestbook example](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/guestbook/) diff --git a/content/en/docs/user-guide/walkthrough/k8s201.md b/content/en/docs/tutorials/k8s201.md similarity index 88% rename from content/en/docs/user-guide/walkthrough/k8s201.md rename to content/en/docs/tutorials/k8s201.md index daf6c7313e..30d64ac8c9 100644 --- a/content/en/docs/user-guide/walkthrough/k8s201.md +++ b/content/en/docs/tutorials/k8s201.md @@ -7,7 +7,7 @@ title: Kubernetes 201 ## Labels, Deployments, Services and Health Checking -If you went through [Kubernetes 101](/docs/user-guide/walkthrough/), you learned about kubectl, Pods, Volumes, and multiple containers. +If you went through [Kubernetes 101](/docs/tutorials/k8s1.1/), you learned about kubectl, Pods, Volumes, and multiple containers. For Kubernetes 201, we will pick up where 101 left off and cover some slightly more advanced topics in Kubernetes, related to application productionization, Deployment and scaling. @@ -30,14 +30,14 @@ To add a label, add a labels section under metadata in the Pod definition: app: nginx ``` -For example, here is the nginx Pod definition with labels ([pod-nginx-with-label.yaml](/docs/user-guide/walkthrough/pod-nginx-with-label.yaml)): +For example, here is the nginx Pod definition with labels ([pod-nginx-with-label.yaml](/docs/tutorials/pod-nginx-with-label.yaml)): {{< code file="pod-nginx-with-label.yaml" >}} -Create the labeled Pod ([pod-nginx-with-label.yaml](/docs/user-guide/walkthrough/pod-nginx-with-label.yaml)): +Create the labeled Pod ([pod-nginx-with-label.yaml](/docs/tutorials/pod-nginx-with-label.yaml)): ```shell -kubectl create -f https://k8s.io/docs/user-guide/walkthrough/pod-nginx-with-label.yaml +kubectl create -f https://k8s.io/docs/tutorials/pod-nginx-with-label.yaml ``` List all Pods with the label `app=nginx`: @@ -74,7 +74,7 @@ Here is a Deployment that instantiates two nginx Pods: Create an nginx Deployment: ```shell -kubectl create -f https://k8s.io/docs/user-guide/walkthrough/deployment.yaml +kubectl create -f https://k8s.io/docs/tutorials/deployment.yaml ``` List all Deployments: @@ -95,7 +95,7 @@ contains the desired changes: {{< code file="deployment-update.yaml" >}} ```shell -kubectl apply -f https://k8s.io/docs/user-guide/walkthrough//deployment-update.yaml +kubectl apply -f https://k8s.io/docs/tutorials/deployment-update.yaml ``` Watch the Deployment create Pods with new names and delete the old Pods: @@ -117,17 +117,17 @@ For more information, such as how to rollback Deployment changes to a previous v Once you have a replicated set of Pods, you need an abstraction that enables connectivity between the layers of your application. For example, if you have a Deployment managing your backend jobs, you don't want to have to reconfigure your front-ends whenever you re-scale your backends. Likewise, if the Pods in your backends are scheduled (or rescheduled) onto different machines, you can't be required to re-configure your front-ends. In Kubernetes, the service abstraction achieves these goals. A service provides a way to refer to a set of Pods (selected by labels) with a single static IP address. It may also provide load balancing, if supported by the provider. -For example, here is a service that balances across the Pods created in the previous nginx Deployment example ([service.yaml](/docs/user-guide/walkthrough/service.yaml)): +For example, here is a service that balances across the Pods created in the previous nginx Deployment example ([service.yaml](/docs/tutorials/service.yaml)): {{< code file="service.yaml" >}} ### Service Management -Create an nginx service ([service.yaml](/docs/user-guide/walkthrough/service.yaml)): +Create an nginx service ([service.yaml](/docs/tutorials/service.yaml)): ```shell -kubectl create -f https://k8s.io/docs/user-guide/walkthrough/service.yaml +kubectl create -f https://k8s.io/docs/tutorials/service.yaml ``` List all services: @@ -222,11 +222,11 @@ In all cases, if the Kubelet discovers a failure the container is restarted. The container health checks are configured in the `livenessProbe` section of your container config. There you can also specify an `initialDelaySeconds` that is a grace period from when the container is started to when health checks are performed, to enable your container to perform any necessary initialization. -Here is an example config for a Pod with an HTTP health check ([pod-with-http-healthcheck.yaml](/docs/user-guide/walkthrough/pod-with-http-healthcheck.yaml)): +Here is an example config for a Pod with an HTTP health check ([pod-with-http-healthcheck.yaml](/docs/tutorials/pod-with-http-healthcheck.yaml)): {{< code file="pod-with-http-healthcheck.yaml" >}} -And here is an example config for a Pod with a TCP Socket health check ([pod-with-tcp-socket-healthcheck.yaml](/docs/user-guide/walkthrough/pod-with-tcp-socket-healthcheck.yaml)): +And here is an example config for a Pod with a TCP Socket health check ([pod-with-tcp-socket-healthcheck.yaml](/docs/tutorials/pod-with-tcp-socket-healthcheck.yaml)): {{< code file="pod-with-tcp-socket-healthcheck.yaml" >}} diff --git a/content/en/docs/user-guide/walkthrough/pod-nginx-with-label.yaml b/content/en/docs/tutorials/pod-nginx-with-label.yaml similarity index 100% rename from content/en/docs/user-guide/walkthrough/pod-nginx-with-label.yaml rename to content/en/docs/tutorials/pod-nginx-with-label.yaml diff --git a/content/en/docs/user-guide/walkthrough/pod-nginx.yaml b/content/en/docs/tutorials/pod-nginx.yaml similarity index 100% rename from content/en/docs/user-guide/walkthrough/pod-nginx.yaml rename to content/en/docs/tutorials/pod-nginx.yaml diff --git a/content/en/docs/user-guide/walkthrough/pod-redis.yaml b/content/en/docs/tutorials/pod-redis.yaml similarity index 100% rename from content/en/docs/user-guide/walkthrough/pod-redis.yaml rename to content/en/docs/tutorials/pod-redis.yaml diff --git a/content/en/docs/user-guide/walkthrough/pod-with-http-healthcheck.yaml b/content/en/docs/tutorials/pod-with-http-healthcheck.yaml similarity index 100% rename from content/en/docs/user-guide/walkthrough/pod-with-http-healthcheck.yaml rename to content/en/docs/tutorials/pod-with-http-healthcheck.yaml diff --git a/content/en/docs/user-guide/walkthrough/pod-with-tcp-socket-healthcheck.yaml b/content/en/docs/tutorials/pod-with-tcp-socket-healthcheck.yaml similarity index 100% rename from content/en/docs/user-guide/walkthrough/pod-with-tcp-socket-healthcheck.yaml rename to content/en/docs/tutorials/pod-with-tcp-socket-healthcheck.yaml diff --git a/content/en/docs/user-guide/walkthrough/service.yaml b/content/en/docs/tutorials/service.yaml similarity index 100% rename from content/en/docs/user-guide/walkthrough/service.yaml rename to content/en/docs/tutorials/service.yaml diff --git a/content/en/docs/user-guide/OWNERS b/content/en/docs/user-guide/OWNERS deleted file mode 100644 index ed617b450a..0000000000 --- a/content/en/docs/user-guide/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -reviewers: -- erictune -- janetkuo -- satnam6502 - diff --git a/content/en/docs/user-guide/_index.md b/content/en/docs/user-guide/_index.md deleted file mode 100644 index cfcbab5728..0000000000 --- a/content/en/docs/user-guide/_index.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -toc_hide: true ---- diff --git a/content/en/docs/user-guide/walkthrough/OWNERS b/content/en/docs/user-guide/walkthrough/OWNERS deleted file mode 100644 index cc182504e9..0000000000 --- a/content/en/docs/user-guide/walkthrough/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -reviewers: -- eparis -- janetkuo -- mikedanese - diff --git a/static/_redirects b/static/_redirects index 1e2782722e..3071881bcf 100644 --- a/static/_redirects +++ b/static/_redirects @@ -443,7 +443,8 @@ /docs/user-guide/update-dem/ /docs/tasks/run-application/rolling-update-replication-controller/ 301 /docs/user-guide/update-demo/ /docs/tasks/run-application/rolling-update-replication-controller/ 301 /docs/user-guide/volumes/ /docs/concepts/storage/volumes/ 301 - +/docs/user-guide/walkthrough/ /docs/tutorials/k8s101/ 301 +/docs/user-guide/walkthrough/k8s201/ /docs/tutorials/k8s201/ 301 /docs/user-guide/working-with-resources/ /docs/concepts/overview/object-management-kubectl/overview/ 301 /docs/whatisk8s/ /docs/concepts/overview/what-is-kubernetes/ 301 diff --git a/test/examples_test.go b/test/examples_test.go index 89a179e3b8..29671c00fd 100644 --- a/test/examples_test.go +++ b/test/examples_test.go @@ -517,16 +517,6 @@ func TestExampleObjectSchemas(t *testing.T) { "redis-slave-deployment": {&extensions.Deployment{}}, "redis-slave-service": {&api.Service{}}, }, - "docs/user-guide/walkthrough": { - "deployment": {&extensions.Deployment{}}, - "deployment-update": {&extensions.Deployment{}}, - "pod-nginx": {&api.Pod{}}, - "pod-nginx-with-label": {&api.Pod{}}, - "pod-redis": {&api.Pod{}}, - "pod-with-http-healthcheck": {&api.Pod{}}, - "pod-with-tcp-socket-healthcheck": {&api.Pod{}}, - "service": {&api.Service{}}, - }, } // Note a key in the following map has to be complete relative path