Downloadable examples for “Run applications” section (#14147)
* 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. * Tweak wording for stateful app pod example * Adopt formatting conventions for code blocks * Move ReplicationController sample YAML to examples In aid of https://github.com/kubernetes/website/issues/12740 * Move PodDisruptionBudget sample YAML to examples In aid of https://github.com/kubernetes/website/issues/12740 * Update test schema for new examples * Use Unicode ellipsis in example Aim here is to make the elision more obvious
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
b3e3332739
commit
7b44b7a3df
@@ -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
|
||||
@@ -141,8 +141,8 @@ ordinal index.
|
||||
It waits until each Pod reports being Ready before starting the next one.
|
||||
|
||||
In addition, the controller assigns each Pod a unique, stable name of the form
|
||||
`<statefulset-name>-<ordinal-index>`.
|
||||
In this case, that results in Pods named `mysql-0`, `mysql-1`, and `mysql-2`.
|
||||
`<statefulset-name>-<ordinal-index>`, which results in Pods named `mysql-0`,
|
||||
`mysql-1`, and `mysql-2`.
|
||||
|
||||
The Pod template in the above StatefulSet manifest takes advantage of these
|
||||
properties to perform orderly startup of MySQL replication.
|
||||
|
||||
Reference in New Issue
Block a user