From a3dae2b7514c818b3ede6f26877705cf909fcdba Mon Sep 17 00:00:00 2001 From: Tim Bannister Date: Tue, 19 Mar 2019 19:38:45 +0000 Subject: [PATCH] Move examples ahead of commands that use them In support of https://github.com/kubernetes/website/issues/12740 The aim is to adopt a consistent style around providing downloadable examples for use with kubectl, etc. --- .../run-replicated-stateful-application.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 1c74858f247a4..5a35062aec085 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 @@ -59,12 +59,12 @@ and a StatefulSet. Create the ConfigMap from the following YAML configuration file: +{{< codenew file="application/mysql/mysql-configmap.yaml" >}} + ```shell kubectl apply -f https://k8s.io/examples/application/mysql/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. In this case, you want the master to be able to serve replication logs to slaves @@ -79,12 +79,12 @@ based on information provided by the StatefulSet controller. Create the Services from the following YAML configuration file: +{{< codenew file="application/mysql/mysql-services.yaml" >}} + ```shell kubectl apply -f https://k8s.io/examples/application/mysql/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. Because the Headless Service is named `mysql`, the Pods are accessible by @@ -105,12 +105,12 @@ writes. Finally, create the StatefulSet from the following YAML configuration file: +{{< codenew file="application/mysql/mysql-statefulset.yaml" >}} + ```shell kubectl apply -f https://k8s.io/examples/application/mysql/mysql-statefulset.yaml ``` -{{< codenew file="application/mysql/mysql-statefulset.yaml" >}} - You can watch the startup progress by running: ```shell