SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
Kubernetes basics
Kubernetes basics
1. Cluster
2. Namespaces
3. Working with a cluster
4. Everything runs on Nodes
5. Pod
6. Service / Deployment
7. Horizontal Pod Autoscaler
8. Deployment strategy
9. Ingress
10. Persistent Volume Claim
11. Configmap
12. Statefullset
13. Job
14. Cron
15. Loadtesting
16. Monitoring
17. Logs
Blogpost
with some o
this content
Clusters
4
Cluster creation
Manual in Code
5
Working with clusters
Tools for the job
Namespaces
Everything runs on Nodes
Pod
Real life example:
Pod - Service - Deployment - Autoscaling
Pod - Service - Deployment - Autoscaling
NEED TO KNOW: HPA needs resource limitations set on
pods & CPU < 1 will throttle your system.
11
Kubernetes - autoscaling
The cool stuff
Describe the
HPA
Defined the pods as a deployment
With resources
✨ cool stuff 💫
12
Kubernetes - Deployment strategy
✨ more cool stuff 💫
13
Drupal & Zero downtime deploys
Schema updates
No Schema updates
14
Drupal Zero downtime deploys
15
Ingress
16
Persistent Volume Claim
Pod
Pod
PVC
Volume
Claim
Volume
eg:
/sites/default/files
/tmp
/private
17
Configmap
MAIN USE
Especially practical if you want to use an
external docker container image (eg memcache or varnish)
with your specific config (without creating your own images)
18
Configmap
PRACTICAL FOR DEBUGGING
Also super practical to add php.ini or nginx or apache config to your
custom images.
This adds the possibility to fiddle on an (obviously not production)
environment with the config without a full build + deployment (which is
slow).
Change configmap + delete pod (triggers recreate with new config)
19
StatefullSet
Statefullset
State
POD 2
POD 1
time
20
StatefullSet
eg: memcache or redis
21
Job
PHP-Pod
Job
PHP-Pod
22
Cron
Cronjob
Job
Pod
Job
Pod
Every X, create
23
Cron
24
Loadtesting (job)
Put some traffic into it
Rolling deploys
Autoscaling
Filemounts
Reverse proxy cache
Object Cache
Cron
Deployment
K6 Loadtesting
Monitoring sidecar
25
Monitoring
⚠ ⚠ ⚠ Sidecars Prevent killing of pods.
https://medium.com/finnovate-io/how-to-prevent-kubernetes-cron-jobs-with-sidecar-containers-from-getting-
stuck-912c0f1497a3
26
Logs
Infra as code
Infra as code
This is the representation of the above kubernetes concept specifically for (normal) drupal
drupal-helm-charts-k8s
Pitfalls
W
a
r
n
i
n
g
Fix your version
All of a sudden you’re running a newer version of varnish in your cluster
, this is something you want to test!
Pitfalls
W
a
r
n
i
n
g
# Validate helm to not leave a broken state.
- name: DRY RUN
run: |
cd helm
helm upgrade --dry-run --timeout 15m --install -n ${{
inputs.app_key }}-${{ inputs.environment }} -f values-${{
inputs.environment }}.yaml --set deploy.runid=${{ github.run_id }}
--set image.tag=${{ inputs.version }} --set image.version=${{
inputs.version }} ${{ inputs.app_key }} .
It’s not always correct (sometimes deploys still fail) but will fail if your
syntax is wrong in your overrides and will prevent you bringing
everything down.
Do this before the actual deploy!
Pitfalls
W
a
r
n
i
n
g
- name: DRY RUN
run: |
cd helm
helm upgrade --dry-run --timeout 15m --install -n ${{
inputs.app_key }}-${{ inputs.environment }} -f values-${{
inputs.environment }}.yaml --set deploy.runid=${{ github.run_id }}
--set image.tag=${{ inputs.version }} --set image.version=${{
inputs.version }} ${{ inputs.app_key }} .
Pitfalls
W
a
r
n
i
n
g
The first month in PRD
The CPU’s were throttling, even with not much load on the
systems.
Only after checking Dynatrace and tweaking the CPU from
500m to 1 the throttling disappeared (response time decrease
& performance increase).
Pitfalls
W
a
r
n
i
n
g
regular POD <VS> Deployment
Use a Deployment if you want the pods to be there after
a cluster rebuild (eg. global outage).
Obviously we learned this the hard way.

Weitere ähnliche Inhalte

Ähnlich wie [k8s] Kubernetes terminology (1).pdf

PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
Hannes Hapke
 

Ähnlich wie [k8s] Kubernetes terminology (1).pdf (20)

Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
 
Uri Cohen & Dan Kilman, GigaSpaces - Orchestration Tool Roundup - OpenStack l...
Uri Cohen & Dan Kilman, GigaSpaces - Orchestration Tool Roundup - OpenStack l...Uri Cohen & Dan Kilman, GigaSpaces - Orchestration Tool Roundup - OpenStack l...
Uri Cohen & Dan Kilman, GigaSpaces - Orchestration Tool Roundup - OpenStack l...
 
Helm intro
Helm introHelm intro
Helm intro
 
reBuy on Kubernetes
reBuy on KubernetesreBuy on Kubernetes
reBuy on Kubernetes
 
Ansible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonAnsible & Salt - Vincent Boon
Ansible & Salt - Vincent Boon
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructure
 
Production Grade Kubernetes Applications
Production Grade Kubernetes ApplicationsProduction Grade Kubernetes Applications
Production Grade Kubernetes Applications
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesDeploying PostgreSQL on Kubernetes
Deploying PostgreSQL on Kubernetes
 
Ultimate Survival - React-Native edition
Ultimate Survival - React-Native editionUltimate Survival - React-Native edition
Ultimate Survival - React-Native edition
 
Smoking docker
Smoking dockerSmoking docker
Smoking docker
 
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, KyivKubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
 
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes][HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
 
Docker and DevOps --- new IT culture
Docker and DevOps --- new IT cultureDocker and DevOps --- new IT culture
Docker and DevOps --- new IT culture
 
Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Trust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersTrust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker Containers
 
廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
 
Kubernetes: training micro-dragons for a serious battle
Kubernetes: training micro-dragons for a serious battleKubernetes: training micro-dragons for a serious battle
Kubernetes: training micro-dragons for a serious battle
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 

[k8s] Kubernetes terminology (1).pdf