From a18af8f4c4e43773ed9eea5b764bfa46be324d3c Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Wed, 1 Jun 2022 08:57:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Fix=20WaitForFirstConsumer=20wit?= =?UTF-8?q?h=20OpenEBS=20hostpath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slides/k8s/openebs.md | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/slides/k8s/openebs.md b/slides/k8s/openebs.md index 3852fc8c..e733c39f 100644 --- a/slides/k8s/openebs.md +++ b/slides/k8s/openebs.md @@ -190,19 +190,25 @@ EOF --- -## Making sure that a PV was created for our PVC +## `WaitForFirstConsumer` -- Normally, the `openebs-hostpath` StorageClass created a PV for our PVC +- Did OpenEBS create a PV for our PVC? .lab[ -- Look at the PV and PVC: +- Find out: ```bash kubectl get pv,pvc ``` ] +-- + +- No! + +- This is because that class is `WaitForFirstConsumer` instead of `Immediate` + --- ## Create a Pod to consume the PV @@ -231,6 +237,21 @@ EOF --- +## Making sure that a PV was created for our PVC + +- At that point, the `openebs-hostpath` StorageClass created a PV for our PVC + +.lab[ + +- Look at the PV and PVC: + ```bash + kubectl get pv,pvc + ``` + +] + +--- + ## Verify that data is written on the node - Let's find the file written by the Pod on the node where the Pod is running @@ -335,4 +356,4 @@ EOF :EN:- Deploying stateful apps with OpenEBS :FR:- Comprendre le "Container Attached Storage" (CAS) -:FR:- Déployer une application "stateful" avec OpenEBS \ No newline at end of file +:FR:- Déployer une application "stateful" avec OpenEBS