Move walkthroughs from user-guide to tutorials. (#8933)

This commit is contained in:
Steve Perry
2018-06-06 12:36:25 -07:00
committed by k8s-ci-robot
parent 6c5685b01b
commit 70fd7dca04
15 changed files with 18 additions and 41 deletions
@@ -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/)
@@ -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" >}}
-5
View File
@@ -1,5 +0,0 @@
reviewers:
- erictune
- janetkuo
- satnam6502
-3
View File
@@ -1,3 +0,0 @@
---
toc_hide: true
---
@@ -1,5 +0,0 @@
reviewers:
- eparis
- janetkuo
- mikedanese
+2 -1
View File
@@ -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
-10
View File
@@ -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