From dc8bd210621c41ca4fbe4056b36c78c17582158f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Mon, 20 Mar 2023 12:56:06 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=83=20Add=20YAML=20exercise?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slides/exercises/yaml-brief.md | 5 +++++ slides/exercises/yaml-details.md | 37 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 slides/exercises/yaml-brief.md create mode 100644 slides/exercises/yaml-details.md diff --git a/slides/exercises/yaml-brief.md b/slides/exercises/yaml-brief.md new file mode 100644 index 00000000..72709e78 --- /dev/null +++ b/slides/exercises/yaml-brief.md @@ -0,0 +1,5 @@ +## Exercise — Writing YAML + +- Produce YAML manifests for dockercoins + + (using the technique of your choice) diff --git a/slides/exercises/yaml-details.md b/slides/exercises/yaml-details.md new file mode 100644 index 00000000..f2fc8938 --- /dev/null +++ b/slides/exercises/yaml-details.md @@ -0,0 +1,37 @@ +# Exercise — Writing YAML + +- We want to generate YAML manifests for the dockercoins app + +- Reminder: it includes 5 Deployments and 4 Services + +- Feel free to put everything in a single file, or one file per manifest + +- The manifests can be: + + - authored (based on examples found in the Kubernetes docs or online) + + - generated (with `kubectl create ... --dry-run -o yaml` or some web app) + + - dumped (with `kubectl get ... -o yaml`) from existing resources + +- Use whatever works best for you! + +--- + +## Goal + +- It should be possible to deploy dockercoins by doing: + ```bash + kubectl create namespace dockercoins + kubectl apply --namespace dockercoins -f `...` + ``` + +- Reminder: the argument given to `-f` can be a directory + + (in which case all the YAML files in the directory will be processed) + +- Bonus: try to minimize the manifests by removing empty or optional fields + +- Compare your manifests with [the ones in the container.training repository][manifests] + +[manifests]: https://github.com/jpetazzo/container.training/blob/main/k8s/dockercoins.yaml