Consolidate YAML files [part-14] (#9379)

This PR deals with the getting started guides (windows) and tutorials
sections. Since the YAML files in the windows directory currently are not
referenced at all, this PR refactored the markdown file to correct this
problem. When appropriate, we use the YAML content from the markdown in
the extracted version.
This commit is contained in:
Qiming
2018-07-04 14:58:20 +08:00
committed by k8s-ci-robot
parent ea6004bd4f
commit 3dd65e4e95
22 changed files with 180 additions and 294 deletions
+18 -20
View File
@@ -35,7 +35,7 @@ For more information, see [Pods](/docs/concepts/workloads/pods/pod/).
The simplest Pod definition describes the deployment of a single container. For example, an nginx web server Pod might be defined as:
{{< code file="pod-nginx.yaml" >}}
{{< codenew file="pods/simple-pod.yaml" >}}
A Pod definition is a declaration of a _desired state_. Desired state is a very important concept in the Kubernetes model. Many things present a desired state to the system, and Kubernetes' ensures that the current state matches the desired state. For example, when you create a Pod and declare that the containers in it to be running. If the containers happen not to be running because of a program failure, Kubernetes continues to (re-)create the Pod in order to drive the pod to the desired state. This process continues until you delete the Pod.
@@ -44,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/tutorials/pod-nginx.yaml)):
Create a Pod containing an nginx server ([simple-pod.yaml](/examples/pods/simple-pod.yaml)):
```shell
$ kubectl create -f docs/tutorials/pod-nginx.yaml
$ kubectl create -f https://k8s.io/examples/pods/simple-pod.yaml
```
List all Pods:
@@ -85,27 +85,25 @@ In this example you can create a Redis Pod with a named volume, and a volume mou
1. Define a Volume:
```yaml
volumes:
- name: redis-persistent-storage
emptyDir: {}
```
```yaml
volumes:
- name: redis-storage
emptyDir: {}
```
2. Define a Volume mount within a container definition:
1. Define a Volume mount within a container definition:
```yaml
volumeMounts:
   # name must match the volume name defined in volumes
   - name: redis-persistent-storage
# mount path within the container
mountPath: /data/redis
```
```yaml
volumeMounts:
 # name must match the volume name defined in volumes
 - name: redis-storage
# mount path within the container
mountPath: /data/redis
```
Here is an example of Redis Pod definition with a persistent storage volume ([redis.yaml](/examples/pods/storage/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" >}}
{{< codenew file="pods/storage/redis.yaml" >}}
Where: