diff --git a/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md b/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md index 428d419dca..7d93e432ce 100644 --- a/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md +++ b/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md @@ -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 %}} \ No newline at end of file +{{% /capture %}} diff --git a/content/en/docs/tasks/run-application/run-replicated-stateful-application.md b/content/en/docs/tasks/run-application/run-replicated-stateful-application.md index 6c43288ebd..8ba5248b09 100644 --- a/content/en/docs/tasks/run-application/run-replicated-stateful-application.md +++ b/content/en/docs/tasks/run-application/run-replicated-stateful-application.md @@ -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: diff --git a/content/en/docs/tasks/run-application/run-single-instance-stateful-application.md b/content/en/docs/tasks/run-application/run-single-instance-stateful-application.md index b82dfbb759..275dcfec07 100644 --- a/content/en/docs/tasks/run-application/run-single-instance-stateful-application.md +++ b/content/en/docs/tasks/run-application/run-single-instance-stateful-application.md @@ -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: diff --git a/content/en/docs/tasks/run-application/update-api-object-kubectl-patch.md b/content/en/docs/tasks/run-application/update-api-object-kubectl-patch.md index cdf2d73a55..d5c3f68213 100644 --- a/content/en/docs/tasks/run-application/update-api-object-kubectl-patch.md +++ b/content/en/docs/tasks/run-application/update-api-object-kubectl-patch.md @@ -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: diff --git a/content/en/docs/tasks/run-application/deployment-patch-demo.yaml b/content/en/examples/application/deployment-patch.yaml similarity index 100% rename from content/en/docs/tasks/run-application/deployment-patch-demo.yaml rename to content/en/examples/application/deployment-patch.yaml diff --git a/content/en/docs/tasks/run-application/hpa-php-apache.yaml b/content/en/examples/application/hpa/php-apache.yaml similarity index 100% rename from content/en/docs/tasks/run-application/hpa-php-apache.yaml rename to content/en/examples/application/hpa/php-apache.yaml diff --git a/content/en/docs/tasks/run-application/mysql-configmap.yaml b/content/en/examples/application/mysql/mysql-configmap.yaml similarity index 100% rename from content/en/docs/tasks/run-application/mysql-configmap.yaml rename to content/en/examples/application/mysql/mysql-configmap.yaml diff --git a/content/en/docs/tasks/run-application/mysql-deployment.yaml b/content/en/examples/application/mysql/mysql-deployment.yaml similarity index 100% rename from content/en/docs/tasks/run-application/mysql-deployment.yaml rename to content/en/examples/application/mysql/mysql-deployment.yaml diff --git a/content/en/docs/tasks/run-application/mysql-pv.yaml b/content/en/examples/application/mysql/mysql-pv.yaml similarity index 100% rename from content/en/docs/tasks/run-application/mysql-pv.yaml rename to content/en/examples/application/mysql/mysql-pv.yaml diff --git a/content/en/docs/tasks/run-application/mysql-services.yaml b/content/en/examples/application/mysql/mysql-services.yaml similarity index 100% rename from content/en/docs/tasks/run-application/mysql-services.yaml rename to content/en/examples/application/mysql/mysql-services.yaml diff --git a/content/en/docs/tasks/run-application/mysql-statefulset.yaml b/content/en/examples/application/mysql/mysql-statefulset.yaml similarity index 100% rename from content/en/docs/tasks/run-application/mysql-statefulset.yaml rename to content/en/examples/application/mysql/mysql-statefulset.yaml diff --git a/test/examples_test.go b/test/examples_test.go index d1d8a2b976..4ad4232262 100644 --- a/test/examples_test.go +++ b/test/examples_test.go @@ -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{}},