From 52ff2c10aef28780e3b204d4b2445915d818de63 Mon Sep 17 00:00:00 2001 From: Arnaud M Date: Mon, 20 Jan 2025 11:37:48 +0100 Subject: [PATCH] Add new deployment with dogs Signed-off-by: Arnaud M --- kubernetes/training/lessons/2-cat-dog.md | 23 ++++++++++++++++++ .../lessons/deployment-2-dogs.yml.gpg | Bin 0 -> 2119 bytes 2 files changed, 23 insertions(+) create mode 100644 kubernetes/training/lessons/2-cat-dog.md create mode 100644 kubernetes/training/lessons/deployment-2-dogs.yml.gpg diff --git a/kubernetes/training/lessons/2-cat-dog.md b/kubernetes/training/lessons/2-cat-dog.md new file mode 100644 index 0000000..0e757a2 --- /dev/null +++ b/kubernetes/training/lessons/2-cat-dog.md @@ -0,0 +1,23 @@ +# Kubernetes Cats and Dogs + +## The dog api + +Behind demo-flask, we are using thecatapi.com +The same API also exist for dogs: thedogapi.com + +## Exo + +What you need to do now is to create a new deployment that will use the dog api. + +At the end, when browsing the website, I want to see half of the time a dog, half of the time a cat. + +Try to figure out how to achieve this. + +Some clues: +- you may need to use configmap and volumes to change start.py +- you may need to create two deployments (one for cats, one for dogs) +- you may need to use the same labels for both deployments so the service will loadbalance between the two of them + +## Bonus + +Add some HTTPS certificates using letsencrypt (maybe using certmanager) diff --git a/kubernetes/training/lessons/deployment-2-dogs.yml.gpg b/kubernetes/training/lessons/deployment-2-dogs.yml.gpg new file mode 100644 index 0000000000000000000000000000000000000000..5154b13dec7e5c418671189996148d65fade7662 GIT binary patch literal 2119 zcmV-N2)Or!0t^EnbTrgyHvzS4J?}2k840_YQowNsIXidBMDh)Yv0j)#Aw4J7IW0VY$soVnI4s=?8 zR2Bt=CmcP3lGA@D(j}F|w6&~HmtJJ0_P5mV3ZClR+&6RARCBkq?nQsED%fjv__JGe zm96WZ_y=8+0PXnla@dAlr2x-)vNt#>1Gs_ z;o1cqPQB6qj&3;s(JDEV3P3F)n(B2#l1d5(nw3S2Y~sr3luV_$3&h{n&=RwCF13{z=2s4tqbS>xx@eP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