Consolidate YAML files [part-3] (#9237)
This PR consolidates YAML files used in `tasks/run-application` subdirectory.
This commit is contained in:
@@ -385,12 +385,12 @@ HorizontalPodAutoscaler.
|
|||||||
Instead of using `kubectl autoscale` command to create a HorizontalPodAutoscaler imperatively we
|
Instead of using `kubectl autoscale` command to create a HorizontalPodAutoscaler imperatively we
|
||||||
can use the following file to create it declaratively:
|
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:
|
We will create the autoscaler by executing the following command:
|
||||||
|
|
||||||
```shell
|
```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
|
horizontalpodautoscaler "php-apache" created
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -60,10 +60,10 @@ and a StatefulSet.
|
|||||||
Create the ConfigMap from the following YAML configuration file:
|
Create the ConfigMap from the following YAML configuration file:
|
||||||
|
|
||||||
```shell
|
```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
|
This ConfigMap provides `my.cnf` overrides that let you independently control
|
||||||
configuration on the MySQL master and slaves.
|
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:
|
Create the Services from the following YAML configuration file:
|
||||||
|
|
||||||
```shell
|
```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
|
The Headless Service provides a home for the DNS entries that the StatefulSet
|
||||||
controller creates for each Pod that's part of the set.
|
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:
|
Finally, create the StatefulSet from the following YAML configuration file:
|
||||||
|
|
||||||
```shell
|
```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:
|
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/)
|
[Kubernetes Secrets](/docs/concepts/configuration/secret/)
|
||||||
for a secure solution.
|
for a secure solution.
|
||||||
|
|
||||||
{{< code file="mysql-deployment.yaml" >}}
|
{{< codenew file="application/mysql/mysql-deployment.yaml" >}}
|
||||||
{{< code file="mysql-pv.yaml" >}}
|
{{< codenew file="application/mysql/mysql-pv.yaml" >}}
|
||||||
|
|
||||||
1. Deploy the PV and PVC of the YAML file:
|
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:
|
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:
|
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
|
Here's the configuration file for a Deployment that has two replicas. Each replica
|
||||||
is a Pod that has one container:
|
is a Pod that has one container:
|
||||||
|
|
||||||
{{< code file="deployment-patch-demo.yaml" >}}
|
{{< codenew file="application/deployment-patch.yaml" >}}
|
||||||
|
|
||||||
Create the Deployment:
|
Create the Deployment:
|
||||||
|
|
||||||
```shell
|
```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:
|
View the Pods associated with your Deployment:
|
||||||
|
|||||||
@@ -442,18 +442,20 @@ func TestExampleObjectSchemas(t *testing.T) {
|
|||||||
},
|
},
|
||||||
"examples/application": {
|
"examples/application": {
|
||||||
"deployment": {&extensions.Deployment{}},
|
"deployment": {&extensions.Deployment{}},
|
||||||
|
"deployment-patch": {&extensions.Deployment{}},
|
||||||
"deployment-scale": {&extensions.Deployment{}},
|
"deployment-scale": {&extensions.Deployment{}},
|
||||||
"deployment-update": {&extensions.Deployment{}},
|
"deployment-update": {&extensions.Deployment{}},
|
||||||
},
|
},
|
||||||
"docs/tasks/run-application": {
|
"examples/application/mysql": {
|
||||||
"deployment-patch-demo": {&extensions.Deployment{}},
|
|
||||||
"hpa-php-apache": {&autoscaling.HorizontalPodAutoscaler{}},
|
|
||||||
"mysql-configmap": {&api.ConfigMap{}},
|
"mysql-configmap": {&api.ConfigMap{}},
|
||||||
"mysql-deployment": {&api.Service{}, &extensions.Deployment{}},
|
"mysql-deployment": {&api.Service{}, &extensions.Deployment{}},
|
||||||
"mysql-pv": {&api.PersistentVolume{}, &api.PersistentVolumeClaim{}},
|
"mysql-pv": {&api.PersistentVolume{}, &api.PersistentVolumeClaim{}},
|
||||||
"mysql-services": {&api.Service{}, &api.Service{}},
|
"mysql-services": {&api.Service{}, &api.Service{}},
|
||||||
"mysql-statefulset": {&apps.StatefulSet{}},
|
"mysql-statefulset": {&apps.StatefulSet{}},
|
||||||
},
|
},
|
||||||
|
"examples/application/hpa": {
|
||||||
|
"php-apache": {&autoscaling.HorizontalPodAutoscaler{}},
|
||||||
|
},
|
||||||
"docs/tutorials/clusters": {
|
"docs/tutorials/clusters": {
|
||||||
"hello-apparmor-pod": {&api.Pod{}},
|
"hello-apparmor-pod": {&api.Pod{}},
|
||||||
"my-scheduler": {&extensions.Deployment{}},
|
"my-scheduler": {&extensions.Deployment{}},
|
||||||
|
|||||||
Reference in New Issue
Block a user