diff --git a/slides/k8s/portworx.md b/slides/k8s/portworx.md index 099ea99a..373a96f5 100644 --- a/slides/k8s/portworx.md +++ b/slides/k8s/portworx.md @@ -579,3 +579,23 @@ class: extra-details ``` (on each node where Portworx was running) + +--- + +class: extra-details + +## Dynamic provisioning without a provider + +- What if we want to use Stateful sets without a storage provider? + +- We will have to create volumes manually + + (by creating Persistent Volume objects) + +- These volumes will be automatically bound with matching Persistent Volume Claims + +- We can use local volumes (essentially bind mounts of host directories) + +- Of course, these volumes won't be available in case of node failure + +- Check [this blog post](https://kubernetes.io/blog/2018/04/13/local-persistent-volumes-beta/) for more information and gotchas \ No newline at end of file diff --git a/slides/k8s/statefulsets.md b/slides/k8s/statefulsets.md index 2814695c..22c03b03 100644 --- a/slides/k8s/statefulsets.md +++ b/slides/k8s/statefulsets.md @@ -155,6 +155,45 @@ spec: e.g.: "replicate the data 3 times, and use SSD media" +- The extra details are provided by specifying a Storage Class + +--- + +## What's a Storage Class? + +- A Storage Class is yet another Kubernetes API resource + + (visible with e.g. `kubectl get storageclass` or `kubectl get sc`) + +- It indicates which *provisioner* to use + +- And arbitrary paramters for that provisioner + + (replications levels, type of disk ... anything relevant!) + +- It is necessary to define a Storage Class to use [dynamic provisioning](https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/) + +- Conversely, it is not necessary to define one if you will create volumes manually + +--- + +## Defining a Persistent Volume Claim + +Here is a minimal PVC: + +```yaml +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: my-claim +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +``` + --- ## Using a Persistent Volume Claim