add en pages

This commit is contained in:
Karen Bradshaw
2020-05-30 15:10:23 -04:00
parent 1502e0281d
commit ecc27bbbe7
347 changed files with 2900 additions and 2537 deletions
@@ -7,17 +7,18 @@ reviewers:
- kow3ns
- smarterclayton
title: StatefulSet Basics
content_template: templates/tutorial
content_type: tutorial
weight: 10
---
{{% capture overview %}}
<!-- overview -->
This tutorial provides an introduction to managing applications with
[StatefulSets](/docs/concepts/workloads/controllers/statefulset/). It
demonstrates how to create, delete, scale, and update the Pods of StatefulSets.
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
Before you begin this tutorial, you should familiarize yourself with the
following Kubernetes concepts.
@@ -33,9 +34,10 @@ This tutorial assumes that your cluster is configured to dynamically provision
PersistentVolumes. If your cluster is not configured to do so, you
will have to manually provision two 1 GiB volumes prior to starting this
tutorial.
{{% /capture %}}
{{% capture objectives %}}
## {{% heading "objectives" %}}
StatefulSets are intended to be used with stateful applications and distributed
systems. However, the administration of stateful applications and
distributed systems on Kubernetes is a broad, complex topic. In order to
@@ -49,9 +51,9 @@ After this tutorial, you will be familiar with the following.
* How to delete a StatefulSet
* How to scale a StatefulSet
* How to update a StatefulSet's Pods
{{% /capture %}}
{{% capture lessoncontent %}}
<!-- lessoncontent -->
## Creating a StatefulSet
Begin by creating a StatefulSet using the example below. It is similar to the
@@ -1035,13 +1037,14 @@ Service.
```shell
kubectl delete svc nginx
```
{{% /capture %}}
{{% capture cleanup %}}
## {{% heading "cleanup" %}}
You will need to delete the persistent storage media for the PersistentVolumes
used in this tutorial. Follow the necessary steps, based on your environment,
storage configuration, and provisioning method, to ensure that all storage is
reclaimed.
{{% /capture %}}
@@ -2,11 +2,11 @@
title: "Example: Deploying Cassandra with a StatefulSet"
reviewers:
- ahmetb
content_template: templates/tutorial
content_type: tutorial
weight: 30
---
{{% capture overview %}}
<!-- overview -->
This tutorial shows you how to run [Apache Cassandra](http://cassandra.apache.org/) on Kubernetes. Cassandra, a database, needs persistent storage to provide data durability (application _state_). In this example, a custom Cassandra seed provider lets the database discover new Cassandra instances as they join the Cassandra cluster.
*StatefulSets* make it easier to deploy stateful applications into your Kubernetes cluster. For more information on the features used in this tutorial, see [StatefulSet](/docs/concepts/workloads/controllers/statefulset/).
@@ -23,17 +23,19 @@ nodes in the ring.
This tutorial deploys a custom Cassandra seed provider that lets the database discover
new Cassandra Pods as they appear inside your Kubernetes cluster.
{{< /note >}}
{{% /capture %}}
{{% capture objectives %}}
## {{% heading "objectives" %}}
* Create and validate a Cassandra headless {{< glossary_tooltip text="Service" term_id="service" >}}.
* Use a {{< glossary_tooltip term_id="StatefulSet" >}} to create a Cassandra ring.
* Validate the StatefulSet.
* Modify the StatefulSet.
* Delete the StatefulSet and its {{< glossary_tooltip text="Pods" term_id="pod" >}}.
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
{{< include "task-tutorial-prereqs.md" >}}
To complete this tutorial, you should already have a basic familiarity with {{< glossary_tooltip text="Pods" term_id="pod" >}}, {{< glossary_tooltip text="Services" term_id="service" >}}, and {{< glossary_tooltip text="StatefulSets" term_id="StatefulSet" >}}.
@@ -48,9 +50,9 @@ minikube start --memory 5120 --cpus=4
```
{{< /caution >}}
{{% /capture %}}
{{% capture lessoncontent %}}
<!-- lessoncontent -->
## Creating a headless Service for Cassandra {#creating-a-cassandra-headless-service}
In Kubernetes, a {{< glossary_tooltip text="Service" term_id="service" >}} describes a set of {{< glossary_tooltip text="Pods" term_id="pod" >}} that perform the same task.
@@ -219,9 +221,10 @@ Use `kubectl edit` to modify the size of a Cassandra StatefulSet.
cassandra 4 4 36m
```
{{% /capture %}}
{{% capture cleanup %}}
## {{% heading "cleanup" %}}
Deleting or scaling a StatefulSet down does not delete the volumes associated with the StatefulSet. This setting is for your safety because your data is more valuable than automatically purging all related StatefulSet resources.
{{< warning >}}
@@ -261,12 +264,13 @@ By using environment variables you can change values that are inserted into `cas
| `CASSANDRA_RPC_ADDRESS` | `0.0.0.0` |
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
* Learn how to [Scale a StatefulSet](/docs/tasks/run-application/scale-stateful-set/).
* Learn more about the [*KubernetesSeedProvider*](https://github.com/kubernetes/examples/blob/master/cassandra/java/src/main/java/io/k8s/cassandra/KubernetesSeedProvider.java)
* See more custom [Seed Provider Configurations](https://git.k8s.io/examples/cassandra/java/README.md)
{{% /capture %}}
@@ -2,7 +2,7 @@
title: "Example: Deploying WordPress and MySQL with Persistent Volumes"
reviewers:
- ahmetb
content_template: templates/tutorial
content_type: tutorial
weight: 20
card:
name: tutorials
@@ -10,7 +10,7 @@ card:
title: "Stateful Example: Wordpress with Persistent Volumes"
---
{{% capture overview %}}
<!-- overview -->
This tutorial shows you how to deploy a WordPress site and a MySQL database using Minikube. Both applications use PersistentVolumes and PersistentVolumeClaims to store data.
A [PersistentVolume](/docs/concepts/storage/persistent-volumes/) (PV) is a piece of storage in the cluster that has been manually provisioned by an administrator, or dynamically provisioned by Kubernetes using a [StorageClass](/docs/concepts/storage/storage-classes). A [PersistentVolumeClaim](/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) (PVC) is a request for storage by a user that can be fulfilled by a PV. PersistentVolumes and PersistentVolumeClaims are independent from Pod lifecycles and preserve data through restarting, rescheduling, and even deleting Pods.
@@ -23,9 +23,10 @@ This deployment is not suitable for production use cases, as it uses single inst
The files provided in this tutorial are using GA Deployment APIs and are specific to kubernetes version 1.9 and later. If you wish to use this tutorial with an earlier version of Kubernetes, please update the API version appropriately, or reference earlier versions of this tutorial.
{{< /note >}}
{{% /capture %}}
{{% capture objectives %}}
## {{% heading "objectives" %}}
* Create PersistentVolumeClaims and PersistentVolumes
* Create a `kustomization.yaml` with
* a Secret generator
@@ -34,9 +35,10 @@ The files provided in this tutorial are using GA Deployment APIs and are specifi
* Apply the kustomization directory by `kubectl apply -k ./`
* Clean up
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
The example shown on this page works with `kubectl` 1.14 and above.
@@ -47,9 +49,9 @@ Download the following configuration files:
1. [wordpress-deployment.yaml](/examples/application/wordpress/wordpress-deployment.yaml)
{{% /capture %}}
{{% capture lessoncontent %}}
<!-- lessoncontent -->
## Create PersistentVolumeClaims and PersistentVolumes
@@ -218,9 +220,10 @@ Now you can verify that all objects exist.
Do not leave your WordPress installation on this page. If another user finds it, they can set up a website on your instance and use it to serve malicious content. <br/><br/>Either install WordPress by creating a username and password or delete your instance.
{{< /warning >}}
{{% /capture %}}
{{% capture cleanup %}}
## {{% heading "cleanup" %}}
1. Run the following command to delete your Secret, Deployments, Services and PersistentVolumeClaims:
@@ -228,14 +231,15 @@ Do not leave your WordPress installation on this page. If another user finds it,
kubectl delete -k ./
```
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
* Learn more about [Introspection and Debugging](/docs/tasks/debug-application-cluster/debug-application-introspection/)
* Learn more about [Jobs](/docs/concepts/workloads/controllers/jobs-run-to-completion/)
* Learn more about [Port Forwarding](/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)
* Learn how to [Get a Shell to a Container](/docs/tasks/debug-application-cluster/get-shell-running-container/)
{{% /capture %}}
@@ -8,18 +8,19 @@ reviewers:
- kow3ns
- smarterclayton
title: Running ZooKeeper, A Distributed System Coordinator
content_template: templates/tutorial
content_type: tutorial
weight: 40
---
{{% capture overview %}}
<!-- overview -->
This tutorial demonstrates running [Apache Zookeeper](https://zookeeper.apache.org) on
Kubernetes using [StatefulSets](/docs/concepts/workloads/controllers/statefulset/),
[PodDisruptionBudgets](/docs/concepts/workloads/pods/disruptions/#specifying-a-poddisruptionbudget),
and [PodAntiAffinity](/docs/user-guide/node-selection/#inter-pod-affinity-and-anti-affinity-beta-feature).
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
Before starting this tutorial, you should be familiar with the following
Kubernetes concepts.
@@ -40,18 +41,19 @@ This tutorial assumes that you have configured your cluster to dynamically provi
PersistentVolumes. If your cluster is not configured to do so, you
will have to manually provision three 20 GiB volumes before starting this
tutorial.
{{% /capture %}}
{{% capture objectives %}}
## {{% heading "objectives" %}}
After this tutorial, you will know the following.
- How to deploy a ZooKeeper ensemble using StatefulSet.
- How to consistently configure the ensemble using ConfigMaps.
- How to spread the deployment of ZooKeeper servers in the ensemble.
- How to use PodDisruptionBudgets to ensure service availability during planned maintenance.
{{% /capture %}}
{{% capture lessoncontent %}}
<!-- lessoncontent -->
### ZooKeeper Basics
@@ -1090,9 +1092,10 @@ node "kubernetes-node-ixsl" uncordoned
You can use `kubectl drain` in conjunction with `PodDisruptionBudgets` to ensure that your services remain available during maintenance. If drain is used to cordon nodes and evict pods prior to taking the node offline for maintenance, services that express a disruption budget will have that budget respected. You should always allocate additional capacity for critical services so that their Pods can be immediately rescheduled.
{{% /capture %}}
{{% capture cleanup %}}
## {{% heading "cleanup" %}}
- Use `kubectl uncordon` to uncordon all the nodes in your cluster.
- You will need to delete the persistent storage media for the PersistentVolumes
@@ -1100,5 +1103,5 @@ You can use `kubectl drain` in conjunction with `PodDisruptionBudgets` to ensure
storage configuration, and provisioning method, to ensure that all storage is
reclaimed.
{{% /capture %}}