SlideShare a Scribd company logo
Kubernetes & the 12 factors
cloud applications
Ana Maria Mihalceanu
#JBCNConf2019
@ammbra1508#GDG #BJUG
HELLO!
I am Ana
Technical Lead @ IBM
Co-founder of Bucharest Software Craftsmanship Community
Why 12 factors & Kubernetes?
@ammbra1508#GDG #BJUG
Why 12 factors & Kubernetes?
@ammbra1508#GDG #BJUG
Evolution
Declarative
formats
Why 12 factors & Kubernetes?
@ammbra1508#GDG #BJUG
Run at push
of a button
Evolution
Declarative
formats
Scale up
with
minimal
changes
Declarative
formats
Scale up
with
minimal
changes
Why 12 factors & Kubernetes?
@ammbra1508#GDG #BJUG
Portability
Run at push
of a button
Evolution
Declarative
formats
Scale up
with
minimal
changes
Clean
Contract
Why 12 factors & Kubernetes?
@ammbra1508#GDG #BJUG
PortabilityLocal vs
production
Run at push
of a button
Evolution
Declarative
formats
Scale up
with
minimal
changes
Clean
Contract
Continuous
deployment
Scenario
@ammbra1508#GDG #BJUG
FACTOR 1 - CODEBASE
@ammbra1508#GDG #BJUG
One codebase tracked in
revision control,
with multiple deployments.
Kubernetes and the 12 factor cloud apps
FACTOR 1 - CODEBASE
@ammbra1508#GDG #BJUG
HELM
v2.x.y
FACTOR 2 - DEPENDENCIES
@ammbra1508#GDG #BJUG
Explicitly declare and
isolate dependencies.
FACTOR 3 - CONFIGURATION
@ammbra1508#GDG #BJUG
FACTOR 3 - CONFIGURATION
@ammbra1508#GDG #BJUG
Store configuration in the environment.
kubectl create secret docker-registry ${SECRET_NAME}
--namespace ${CLUSTER_NAMESPACE}
--docker-server=${REGISTRY}
--docker-password=${TOKEN}
--docker-username=iamapikey --docker-email=a@b.com
FACTOR 3 - CONFIGURATION
@ammbra1508#GDG #BJUG
Store configuration in the environment.
kubectl create secret docker-registry ${SECRET_NAME}
--namespace ${CLUSTER_NAMESPACE}
--docker-server=${REGISTRY}
--docker-password=${TOKEN}
--docker-username=iamapikey --docker-email=a@b.com
FACTOR 4 – BACKING SERVICE
@ammbra1508#GDG #BJUG
Treat backing services as attached resources.
FACTOR 4 – BACKING SERVICE
@ammbra1508#GDG #BJUG
apiVersion: v1
kind: Secret
metadata:
name: cloudant
type: Opaque
data:
binding: {}
FACTOR 4 – BACKING SERVICE
@ammbra1508#GDG #BJUG
Treat backing services as attached resources.
apiVersion: v1
kind: Secret
metadata:
name: cloudant
type: Opaque
data:
binding: {}
FACTOR 4 – BACKING SERVICE
@ammbra1508#GDG #BJUG
Treat backing services as attached resources.
apiVersion: v1
kind: Secret
metadata:
name: cloudant
type: Opaque
data:
binding: {}
FACTOR 5 – BUILD, RELEASE, RUN
@ammbra1508#GDG #BJUG
FACTOR 5 – BUILD, RELEASE, RUN
@ammbra1508#GDG #BJUG
Strictly separate build
and run stages.
FACTOR 5 – BUILD, RELEASE, RUN
@ammbra1508#GDG #BJUG
Kubernetes and the 12 factor cloud apps
FACTOR 6 – PROCESSES
@ammbra1508#GDG #BJUG
Execute the app as one or
more stateless processes.
Container
Filesystem
Persistent
VolumeVolume
FACTOR 6 – PROCESSES
@ammbra1508#GDG #BJUG
kubectl apply –f ${CREATE_VOLUME}.yaml
kubectl apply –f ${COPY_SCRIPTS_POLLER}.yaml
kubectl cp ./scripts ${POD}:/${LOCATION}
kubectl apply –f ${USE_SCRIPTS}.yaml
FACTOR 7 – PORT BINDING
@ammbra1508#GDG #BJUG
kubectl apply –f ${FILE}
FACTOR 7 – PORT BINDING
@ammbra1508#GDG #BJUG
Export services via port binding.
FACTOR 7 – PORT BINDING
@ammbra1508#GDG #BJUG
Export services via port binding.
kubectl expose deployment/${NAME}
--type=”${SERVICE_TYPE}”
--name=${SERVICE_NAME}
FACTOR 8 – CONCURRENCY
@ammbra1508#GDG #BJUG
Scale out via the process model.
FACTOR 8 – CONCURRENCY
@ammbra1508#GDG #BJUG
kubectl autoscale deployment {$DEPLOYMENT}
--min=${MIN_PODS} --max=${MAX_PODS}
--cpu-percent=${CPU}
--namespace=${NAMESPACE}
FACTOR 8 – CONCURRENCY
@ammbra1508#GDG #BJUG
kubectl autoscale deployment {$DEPLOYMENT}
--min=${MIN_PODS} --max=${MAX_PODS}
--cpu-percent=${CPU}
--namespace=${NAMESPACE}
𝐝𝐞𝐬𝐢𝐫𝐞𝐝𝐑𝐞𝐩𝐥𝐢𝐜𝐚𝐬 = ceil(currentReplicas ×
currentMetricValue
𝐝𝐞𝐬𝐢𝐫𝐞𝐝𝐌𝐞𝐭𝐫𝐢𝐜𝐕𝐚𝐥𝐮𝐞
)
FACTOR 9 – DISPOSABILITY
@ammbra1508#GDG #BJUG
Fast startup Graceful shutdown
Maximize robustness with
FACTOR 9 – DISPOSABILITY
@ammbra1508#GDG #BJUG
Fast startup Graceful shutdown
Maximize robustness with
helm upgrade ${RELEASE} ${CHART} --recreate-pods
FACTOR 9 – DISPOSABILITY
@ammbra1508#GDG #BJUG
Application boot time
FACTOR 9 – DISPOSABILITY
@ammbra1508#GDG #BJUG
Rolling update one after another
Kubernetes and the 12 factor cloud apps
FACTOR 10 – DEV PROD PARITY
@ammbra1508#GDG #BJUG
Time People
Tools
FACTOR 10 – DEV PROD PARITY
@ammbra1508#GDG #BJUG
Keep development, staging and production
as similar as possible.
kubectl create namespace ${NAMESPACE}
FACTOR 11 – LOGS
@ammbra1508#GDG #BJUG
FACTOR 11 – LOGS
@ammbra1508#GDG #BJUG
Treat logs as event streams.
kubectl create secret generic logdna-agent-key
--from-literal=logdna-agent-key=<ingestion_key>
kubectl create -f
https://repo.logdna.com/ibm/prod/logdna-agent-ds-
us-south.yaml
FACTOR 12 – ADMIN PROCESSES
@ammbra1508#GDG #BJUG
Run admin/management tasks as one-off processes.
kubectl create configmap ${CONFIG}
--from-file=scripts/ -o yaml
kubectl apply –f ${ONE_TIME_JOB_CONFIGURATION}
@ammbra1508#GDG #BJUG
TAKEAWAYS
Decouple
Decouple
infrastructure
complexity from your
application code.
Managed Services
Prefer managed
services in matters
involving
persistency.
Environment Parity
Keep your
environments as
similar as possible.
@ammbra1508#GDG #BJUG
TAKEAWAYS
Stateless
Design your
application as
stateless.
Scale
Your application
should be able to
process diverse
workloads.
Monitor
Use appropriate
logging in application
code and implement
cluster-level logging.
@ammbra1508#GDG #BJUG
The strongest factor for success is self-esteem.
Believing you can do it, believing you deserve it,
believing you will get it.
Anonymous
“ “
@ammbra1508#GDG #BJUG
THANKS!
Useful links
https://gist.github.com/ammbra/e951f8192592bc175a971a31df904c2
2
@ammbra1508#GDG #BJUG

More Related Content

PDF
Zero-downtime deployment of Micro-services with Kubernetes
PPTX
12 Factor App
PDF
How to Run Kubernetes in Restrictive Environments
PDF
Openstack days sv building highly available services using kubernetes (preso)
PDF
Kubernetes: one cluster or many
PDF
Pivotal Container Service (PKS) at SF Cloud Foundry Meetup
PDF
Kubernetes 1.21 release
PDF
You Might Just be a Functional Programmer Now
Zero-downtime deployment of Micro-services with Kubernetes
12 Factor App
How to Run Kubernetes in Restrictive Environments
Openstack days sv building highly available services using kubernetes (preso)
Kubernetes: one cluster or many
Pivotal Container Service (PKS) at SF Cloud Foundry Meetup
Kubernetes 1.21 release
You Might Just be a Functional Programmer Now

What's hot (20)

PDF
Cloud Native Development
PDF
Fully Orchestrating Applications, Microservices and Enterprise Services with ...
PPTX
Securing and Automating Kubernetes with Kyverno
PPTX
Fabio rapposelli pks-vmug
PDF
Is your kubernetes negative or positive
PPTX
Tectonic Summit 2016: Multi-Cluster Kubernetes: Planning for Unknowns
PDF
Kubestr browse2021.pptx
PDF
6 Things You Need to Know to Safely Run Kubernetes
PPTX
Basics of Kubernetes on BOSH: Run Production-grade Kubernetes on the SDDC
PPTX
Building Developer Pipelines with PKS, Harbor, Clair, and Concourse
PPTX
Akri cncf-jobs-webinar-final
PDF
An Architectural Deep Dive With Kubernetes And Containers Powerpoint Presenta...
PPTX
Hitting the Enterprise Sweet Spot—A Real-World View of PKS Deployment and Suc...
PDF
運用高效、敏捷全新平台極速落實雲原生開發
PDF
Anthos Application Modernization Platform
PDF
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
PDF
Docker ee an architecture and operations overview
PDF
DCSF19 Kubernetes Security with OPA
PDF
Weave GitOps Core Overview (Free GitOps Workshop)
PPTX
Introduction to KubeSphere and its open source ecosystem
Cloud Native Development
Fully Orchestrating Applications, Microservices and Enterprise Services with ...
Securing and Automating Kubernetes with Kyverno
Fabio rapposelli pks-vmug
Is your kubernetes negative or positive
Tectonic Summit 2016: Multi-Cluster Kubernetes: Planning for Unknowns
Kubestr browse2021.pptx
6 Things You Need to Know to Safely Run Kubernetes
Basics of Kubernetes on BOSH: Run Production-grade Kubernetes on the SDDC
Building Developer Pipelines with PKS, Harbor, Clair, and Concourse
Akri cncf-jobs-webinar-final
An Architectural Deep Dive With Kubernetes And Containers Powerpoint Presenta...
Hitting the Enterprise Sweet Spot—A Real-World View of PKS Deployment and Suc...
運用高效、敏捷全新平台極速落實雲原生開發
Anthos Application Modernization Platform
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
Docker ee an architecture and operations overview
DCSF19 Kubernetes Security with OPA
Weave GitOps Core Overview (Free GitOps Workshop)
Introduction to KubeSphere and its open source ecosystem
Ad

Similar to Kubernetes and the 12 factor cloud apps (20)

PDF
Kubernetes and the 12 factor cloud apps
PDF
Kubernetes &amp; the 12 factor cloud apps
PDF
Kubernetes and the 12 factor cloud apps
PDF
Deep Dive into Kubernetes - Part 2
PPTX
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
PPTX
K8s in 3h - Kubernetes Fundamentals Training
PDF
Kubernetes for the PHP developer
PPTX
Kubernetes Introduction
PDF
Kubernetes Basis: Pods, Deployments, and Services
PDF
LISA2017 Kubernetes: Hit the Ground Running
PPTX
Kube con china_2019_7 missing factors for your production-quality 12-factor apps
PDF
From Containerized Application to Secure and Scaling With Kubernetes
PDF
Google Kubernetes Engine Deep Dive Meetup
PPTX
kubernetesforbeginners.pptx
PPTX
Kubernetes 101
PDF
WSO2 Kubernetes Reference Architecture - Nov 2017
PDF
Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps
PDF
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
PDF
The Kubernetes Effect
PDF
A DevOps guide to Kubernetes
Kubernetes and the 12 factor cloud apps
Kubernetes &amp; the 12 factor cloud apps
Kubernetes and the 12 factor cloud apps
Deep Dive into Kubernetes - Part 2
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
K8s in 3h - Kubernetes Fundamentals Training
Kubernetes for the PHP developer
Kubernetes Introduction
Kubernetes Basis: Pods, Deployments, and Services
LISA2017 Kubernetes: Hit the Ground Running
Kube con china_2019_7 missing factors for your production-quality 12-factor apps
From Containerized Application to Secure and Scaling With Kubernetes
Google Kubernetes Engine Deep Dive Meetup
kubernetesforbeginners.pptx
Kubernetes 101
WSO2 Kubernetes Reference Architecture - Nov 2017
Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
The Kubernetes Effect
A DevOps guide to Kubernetes
Ad

More from Ana-Maria Mihalceanu (20)

PDF
Empower Inclusion Through Accessible Java Applications
PDF
Java 25 and Beyond - A Roadmap of Innovations
PDF
Sécuriser les Applications Java Contre les Menaces Quantiques
PDF
Des joyaux de code natif aux trésors Java avec jextract
PDF
From native code gems to Java treasures with jextract
PDF
Exciting Features and Enhancements in Java 23 and 24
PDF
Monitoring Java Application Security with JDK Tools and JFR Events
PDF
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
PDF
From native code gems to Java treasures with jextract
PDF
Monitoring Java Application Security with JDK Tools and JFR Events
PDF
Java 23 and Beyond - A Roadmap Of Innovations
PDF
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
PDF
Monitoring Java Application Security with JDK Tools and JFR Events
PDF
Java 22 and Beyond- A Roadmap of Innovations
PDF
Surveillance de la sécurité des applications Java avec les outils du JDK e...
PDF
A Glance At The Java Performance Toolbox
PDF
Monitoring Java Application Security with JDK Tools and JFR Events.pdf
PDF
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
PDF
Java 21 Language Features and Beyond
PDF
From Java 17 to 21- A Showcase of JDK Security Enhancements
Empower Inclusion Through Accessible Java Applications
Java 25 and Beyond - A Roadmap of Innovations
Sécuriser les Applications Java Contre les Menaces Quantiques
Des joyaux de code natif aux trésors Java avec jextract
From native code gems to Java treasures with jextract
Exciting Features and Enhancements in Java 23 and 24
Monitoring Java Application Security with JDK Tools and JFR Events
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
From native code gems to Java treasures with jextract
Monitoring Java Application Security with JDK Tools and JFR Events
Java 23 and Beyond - A Roadmap Of Innovations
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
Monitoring Java Application Security with JDK Tools and JFR Events
Java 22 and Beyond- A Roadmap of Innovations
Surveillance de la sécurité des applications Java avec les outils du JDK e...
A Glance At The Java Performance Toolbox
Monitoring Java Application Security with JDK Tools and JFR Events.pdf
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
Java 21 Language Features and Beyond
From Java 17 to 21- A Showcase of JDK Security Enhancements

Recently uploaded (20)

PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
project resource management chapter-09.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
August Patch Tuesday
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
A Presentation on Touch Screen Technology
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Mushroom cultivation and it's methods.pdf
Zenith AI: Advanced Artificial Intelligence
Assigned Numbers - 2025 - Bluetooth® Document
project resource management chapter-09.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
August Patch Tuesday
MIND Revenue Release Quarter 2 2025 Press Release
TLE Review Electricity (Electricity).pptx
OMC Textile Division Presentation 2021.pptx
Approach and Philosophy of On baking technology
Univ-Connecticut-ChatGPT-Presentaion.pdf
A Presentation on Artificial Intelligence
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
A Presentation on Touch Screen Technology
A comparative analysis of optical character recognition models for extracting...
Web App vs Mobile App What Should You Build First.pdf
Encapsulation_ Review paper, used for researhc scholars
SOPHOS-XG Firewall Administrator PPT.pptx
NewMind AI Weekly Chronicles - August'25-Week II
A novel scalable deep ensemble learning framework for big data classification...
Mushroom cultivation and it's methods.pdf

Kubernetes and the 12 factor cloud apps

  • 1. Kubernetes & the 12 factors cloud applications Ana Maria Mihalceanu #JBCNConf2019
  • 2. @ammbra1508#GDG #BJUG HELLO! I am Ana Technical Lead @ IBM Co-founder of Bucharest Software Craftsmanship Community
  • 3. Why 12 factors & Kubernetes? @ammbra1508#GDG #BJUG
  • 4. Why 12 factors & Kubernetes? @ammbra1508#GDG #BJUG Evolution Declarative formats
  • 5. Why 12 factors & Kubernetes? @ammbra1508#GDG #BJUG Run at push of a button Evolution Declarative formats Scale up with minimal changes Declarative formats Scale up with minimal changes
  • 6. Why 12 factors & Kubernetes? @ammbra1508#GDG #BJUG Portability Run at push of a button Evolution Declarative formats Scale up with minimal changes Clean Contract
  • 7. Why 12 factors & Kubernetes? @ammbra1508#GDG #BJUG PortabilityLocal vs production Run at push of a button Evolution Declarative formats Scale up with minimal changes Clean Contract Continuous deployment
  • 9. FACTOR 1 - CODEBASE @ammbra1508#GDG #BJUG One codebase tracked in revision control, with multiple deployments.
  • 11. FACTOR 1 - CODEBASE @ammbra1508#GDG #BJUG HELM v2.x.y
  • 12. FACTOR 2 - DEPENDENCIES @ammbra1508#GDG #BJUG Explicitly declare and isolate dependencies.
  • 13. FACTOR 3 - CONFIGURATION @ammbra1508#GDG #BJUG
  • 14. FACTOR 3 - CONFIGURATION @ammbra1508#GDG #BJUG Store configuration in the environment. kubectl create secret docker-registry ${SECRET_NAME} --namespace ${CLUSTER_NAMESPACE} --docker-server=${REGISTRY} --docker-password=${TOKEN} --docker-username=iamapikey --docker-email=a@b.com
  • 15. FACTOR 3 - CONFIGURATION @ammbra1508#GDG #BJUG Store configuration in the environment. kubectl create secret docker-registry ${SECRET_NAME} --namespace ${CLUSTER_NAMESPACE} --docker-server=${REGISTRY} --docker-password=${TOKEN} --docker-username=iamapikey --docker-email=a@b.com
  • 16. FACTOR 4 – BACKING SERVICE @ammbra1508#GDG #BJUG
  • 17. Treat backing services as attached resources. FACTOR 4 – BACKING SERVICE @ammbra1508#GDG #BJUG apiVersion: v1 kind: Secret metadata: name: cloudant type: Opaque data: binding: {}
  • 18. FACTOR 4 – BACKING SERVICE @ammbra1508#GDG #BJUG Treat backing services as attached resources. apiVersion: v1 kind: Secret metadata: name: cloudant type: Opaque data: binding: {}
  • 19. FACTOR 4 – BACKING SERVICE @ammbra1508#GDG #BJUG Treat backing services as attached resources. apiVersion: v1 kind: Secret metadata: name: cloudant type: Opaque data: binding: {}
  • 20. FACTOR 5 – BUILD, RELEASE, RUN @ammbra1508#GDG #BJUG
  • 21. FACTOR 5 – BUILD, RELEASE, RUN @ammbra1508#GDG #BJUG Strictly separate build and run stages.
  • 22. FACTOR 5 – BUILD, RELEASE, RUN @ammbra1508#GDG #BJUG
  • 24. FACTOR 6 – PROCESSES @ammbra1508#GDG #BJUG Execute the app as one or more stateless processes. Container Filesystem Persistent VolumeVolume
  • 25. FACTOR 6 – PROCESSES @ammbra1508#GDG #BJUG kubectl apply –f ${CREATE_VOLUME}.yaml kubectl apply –f ${COPY_SCRIPTS_POLLER}.yaml kubectl cp ./scripts ${POD}:/${LOCATION} kubectl apply –f ${USE_SCRIPTS}.yaml
  • 26. FACTOR 7 – PORT BINDING @ammbra1508#GDG #BJUG kubectl apply –f ${FILE}
  • 27. FACTOR 7 – PORT BINDING @ammbra1508#GDG #BJUG Export services via port binding.
  • 28. FACTOR 7 – PORT BINDING @ammbra1508#GDG #BJUG Export services via port binding. kubectl expose deployment/${NAME} --type=”${SERVICE_TYPE}” --name=${SERVICE_NAME}
  • 29. FACTOR 8 – CONCURRENCY @ammbra1508#GDG #BJUG Scale out via the process model.
  • 30. FACTOR 8 – CONCURRENCY @ammbra1508#GDG #BJUG kubectl autoscale deployment {$DEPLOYMENT} --min=${MIN_PODS} --max=${MAX_PODS} --cpu-percent=${CPU} --namespace=${NAMESPACE}
  • 31. FACTOR 8 – CONCURRENCY @ammbra1508#GDG #BJUG kubectl autoscale deployment {$DEPLOYMENT} --min=${MIN_PODS} --max=${MAX_PODS} --cpu-percent=${CPU} --namespace=${NAMESPACE} 𝐝𝐞𝐬𝐢𝐫𝐞𝐝𝐑𝐞𝐩𝐥𝐢𝐜𝐚𝐬 = ceil(currentReplicas × currentMetricValue 𝐝𝐞𝐬𝐢𝐫𝐞𝐝𝐌𝐞𝐭𝐫𝐢𝐜𝐕𝐚𝐥𝐮𝐞 )
  • 32. FACTOR 9 – DISPOSABILITY @ammbra1508#GDG #BJUG Fast startup Graceful shutdown Maximize robustness with
  • 33. FACTOR 9 – DISPOSABILITY @ammbra1508#GDG #BJUG Fast startup Graceful shutdown Maximize robustness with helm upgrade ${RELEASE} ${CHART} --recreate-pods
  • 34. FACTOR 9 – DISPOSABILITY @ammbra1508#GDG #BJUG Application boot time
  • 35. FACTOR 9 – DISPOSABILITY @ammbra1508#GDG #BJUG Rolling update one after another
  • 37. FACTOR 10 – DEV PROD PARITY @ammbra1508#GDG #BJUG Time People Tools
  • 38. FACTOR 10 – DEV PROD PARITY @ammbra1508#GDG #BJUG Keep development, staging and production as similar as possible. kubectl create namespace ${NAMESPACE}
  • 39. FACTOR 11 – LOGS @ammbra1508#GDG #BJUG
  • 40. FACTOR 11 – LOGS @ammbra1508#GDG #BJUG Treat logs as event streams. kubectl create secret generic logdna-agent-key --from-literal=logdna-agent-key=<ingestion_key> kubectl create -f https://repo.logdna.com/ibm/prod/logdna-agent-ds- us-south.yaml
  • 41. FACTOR 12 – ADMIN PROCESSES @ammbra1508#GDG #BJUG Run admin/management tasks as one-off processes. kubectl create configmap ${CONFIG} --from-file=scripts/ -o yaml kubectl apply –f ${ONE_TIME_JOB_CONFIGURATION}
  • 42. @ammbra1508#GDG #BJUG TAKEAWAYS Decouple Decouple infrastructure complexity from your application code. Managed Services Prefer managed services in matters involving persistency. Environment Parity Keep your environments as similar as possible.
  • 43. @ammbra1508#GDG #BJUG TAKEAWAYS Stateless Design your application as stateless. Scale Your application should be able to process diverse workloads. Monitor Use appropriate logging in application code and implement cluster-level logging.
  • 44. @ammbra1508#GDG #BJUG The strongest factor for success is self-esteem. Believing you can do it, believing you deserve it, believing you will get it. Anonymous “ “