Consolidate YAML files [part-3] (#9237)

This PR consolidates YAML files used in `tasks/run-application`
subdirectory.
This commit is contained in:
Qiming
2018-07-03 02:15:20 +08:00
committed by k8s-ci-robot
parent 378e061cd3
commit a11e02d575
12 changed files with 20 additions and 18 deletions
@@ -385,13 +385,13 @@ HorizontalPodAutoscaler.
Instead of using `kubectl autoscale` command to create a HorizontalPodAutoscaler imperatively we
can use the following file to create it declaratively:
{{< code file="hpa-php-apache.yaml" >}}
{{< codenew file="application/hpa/php-apache.yaml" >}}
We will create the autoscaler by executing the following command:
```shell
$ kubectl create -f https://k8s.io/docs/tasks/run-application/hpa-php-apache.yaml
$ kubectl create -f https://k8s.io/examples/application/hpa/php-apache.yaml
horizontalpodautoscaler "php-apache" created
```
{{% /capture %}}
{{% /capture %}}
@@ -60,10 +60,10 @@ and a StatefulSet.
Create the ConfigMap from the following YAML configuration file:
```shell
kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-configmap.yaml
kubectl create -f https://k8s.io/examples/application/mysql/mysql-configmap.yaml
```
{{< code file="mysql-configmap.yaml" >}}
{{< codenew file="application/mysql/mysql-configmap.yaml" >}}
This ConfigMap provides `my.cnf` overrides that let you independently control
configuration on the MySQL master and slaves.
@@ -80,10 +80,10 @@ based on information provided by the StatefulSet controller.
Create the Services from the following YAML configuration file:
```shell
kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-services.yaml
kubectl create -f https://k8s.io/examples/application/mysql/mysql-services.yaml
```
{{< code file="mysql-services.yaml" >}}
{{< codenew file="application/mysql/mysql-services.yaml" >}}
The Headless Service provides a home for the DNS entries that the StatefulSet
controller creates for each Pod that's part of the set.
@@ -106,10 +106,10 @@ writes.
Finally, create the StatefulSet from the following YAML configuration file:
```shell
kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-statefulset.yaml
kubectl create -f https://k8s.io/examples/application/mysql/mysql-statefulset.yaml
```
{{< code file="mysql-statefulset.yaml" >}}
{{< codenew file="application/mysql/mysql-statefulset.yaml" >}}
You can watch the startup progress by running:
@@ -48,16 +48,16 @@ Note: The password is defined in the config yaml, and this is insecure. See
[Kubernetes Secrets](/docs/concepts/configuration/secret/)
for a secure solution.
{{< code file="mysql-deployment.yaml" >}}
{{< code file="mysql-pv.yaml" >}}
{{< codenew file="application/mysql/mysql-deployment.yaml" >}}
{{< codenew file="application/mysql/mysql-pv.yaml" >}}
1. Deploy the PV and PVC of the YAML file:
kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-pv.yaml
kubectl create -f https://k8s.io/examples/application/mysql/mysql-pv.yaml
1. Deploy the contents of the YAML file:
kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-deployment.yaml
kubectl create -f https://k8s.io/examples/application/mysql/mysql-deployment.yaml
1. Display information about the Deployment:
@@ -26,12 +26,12 @@ in this task demonstrate a strategic merge patch and a JSON merge patch.
Here's the configuration file for a Deployment that has two replicas. Each replica
is a Pod that has one container:
{{< code file="deployment-patch-demo.yaml" >}}
{{< codenew file="application/deployment-patch.yaml" >}}
Create the Deployment:
```shell
kubectl create -f https://k8s.io/docs/tasks/run-application/deployment-patch-demo.yaml
kubectl create -f https://k8s.io/examples/application/deployment-patch.yaml
```
View the Pods associated with your Deployment:
+5 -3
View File
@@ -442,18 +442,20 @@ func TestExampleObjectSchemas(t *testing.T) {
},
"examples/application": {
"deployment": {&extensions.Deployment{}},
"deployment-patch": {&extensions.Deployment{}},
"deployment-scale": {&extensions.Deployment{}},
"deployment-update": {&extensions.Deployment{}},
},
"docs/tasks/run-application": {
"deployment-patch-demo": {&extensions.Deployment{}},
"hpa-php-apache": {&autoscaling.HorizontalPodAutoscaler{}},
"examples/application/mysql": {
"mysql-configmap": {&api.ConfigMap{}},
"mysql-deployment": {&api.Service{}, &extensions.Deployment{}},
"mysql-pv": {&api.PersistentVolume{}, &api.PersistentVolumeClaim{}},
"mysql-services": {&api.Service{}, &api.Service{}},
"mysql-statefulset": {&apps.StatefulSet{}},
},
"examples/application/hpa": {
"php-apache": {&autoscaling.HorizontalPodAutoscaler{}},
},
"docs/tutorials/clusters": {
"hello-apparmor-pod": {&api.Pod{}},
"my-scheduler": {&extensions.Deployment{}},