mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-05-06 00:46:56 +00:00
📃 Add YAML exercise
This commit is contained in:
5
slides/exercises/yaml-brief.md
Normal file
5
slides/exercises/yaml-brief.md
Normal file
@@ -0,0 +1,5 @@
|
||||
## Exercise — Writing YAML
|
||||
|
||||
- Produce YAML manifests for dockercoins
|
||||
|
||||
(using the technique of your choice)
|
||||
37
slides/exercises/yaml-details.md
Normal file
37
slides/exercises/yaml-details.md
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user