SlideShare a Scribd company logo
1 of 25
7 Missing Factors for Your Production-Quality 12-Factor Apps
Shikha Srivastava
IBM Senior Technical Staff Member
@shikhasthoughts
Michael Elder
IBM Distinguished Engineer
@mdelder
What is Ready for production application
• Secure
• Installation, authentication and access
• Resilient, Highly Available and scale
• Repeated deployment
• with safe upgrades and configuration
changes
• Performance
• Observable
• Upgradeable
• more …..
• And AGILE too
What is a 12-factor app?
• “12-Factor” is a software methodology for
building scalable microservice applications
• Originally created by Heroku
• Best practices designed to enable
applications to be built with portability,
resilience, and scalability when deployed
to the web
Kubernetes & 12-factor apps
5
I. Codebase
One codebase tracked in revision control, many deploys
II. Dependencies
Explicitly declare and isolate dependencies
III. Config
Store config in the environment
IV. Backing services
Treat backing services as attached resources
V. Build, release, run
Strictly separate build and run stages
VI. Processes
Execute the app as one or more stateless processes
VII. Port binding
Export services via port binding
VIII. Concurrency
Scale out via the process model
IX. Disposability
Maximize robustness with fast startup and graceful shutdown
X. Dev/prod parity
Keep development, staging, and production as similar as possible
XI. Logs
Treat logs as event streams
XII. Admin processes
Run admin/management tasks as one-off processes
Why
12 factor
apps?
• Make it easier to run, scale, and
deploy applications
• Keep parity between development
and production
• Provide strict separation between
build, release, and run stages
I. Codebase
One codebase tracked in revision
control, many deploys
II. Dependencies
Explicitly declare and isolate
dependencies
III. Config
Store config in the environment
IV. Backing services
Treat backing services as attached
resources
V. Build, release, run
Strictly separate build and run
stages
VI. Processes
Execute the app as one or more
stateless processes
VII. Port binding
Export services via port binding
VIII. Concurrency
Scale out via the process model
IX. Disposability
Maximize robustness with fast
startup and graceful shutdown
X. Parity between dev & prod
Keep development, staging, and
production as similar as possible
XI. Logs
Treat logs as event streams
XII. Admin processes
Run admin/management tasks as
one-off processes
Code Deploy Operate
Developers dream – Code factors
7
• One codebase for my application
tracked in revision that runs
anywhere: build, ship and run
anywhere
AND
• I can offload deployment, HA,
scaling, upgrade strategy and not
worry about it
Test and
automati
on
Release AGILE
Design
• Container Images built from
Dockerfiles using trusted small image.
Kubernetes Deployments, etc
managed as YAML (F#I- Codebase)
• Having a strong artifact-driven model
makes it easier to follow a
Continuous Delivery lifecycle (F#V-
Build, release, run)
• Using the same images and YAML
objects make it easier for dev teams
to match what’s running in
production
(F#X- Dev/prod parity)
Develop
Deploy factors
Pod
(Single IP Address)
8
• ConfigMaps and Secrets managed in source
repositories or built dynamically via commands
(F#III: Config ). Containers retrieve during runtime
• A collection of Pods can expose or consume
Services via Service port bindings (F#IV : Backing
Services, F#VII: Port binding)
• Container image runs as a container process in a
Pod with other containers (F#VI: Processes )
• Explicitly declare and isolate dependencies(F#II:
Dependencies)
• Running app as a container makes it possible to
capture all logs, metrics, and other management
functions in a consistent way (F#XII: Admin
Process )
Pod
(Single IP Address)
Volume
Volume
container
container
container
Volume
Secret
ConfigMap
Service
Persistent
Volume
Operate factors: Concurrency (F#VIII) &
Disposability (F#IX)
• Ensure scale for your app
• Replica set ensures specified number of pods are always running kind: Deployment
metadata:
name: nginx
spec:
replicas: 2
template:
metadata:
labels:
service: http-server
spec:
containers:
- name: nginx
image: nginx:1.10.2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
• Is this enough?
Remember load is never constant in the real world
Operate factors: Concurrency (F#VIII)
Leverage auto-scaling to automate computation resources based on load
• Horizontal Pod Scaler (HPA)
• Controls the number of replicas
• Use cpu or memory as a trigger or use
custom metric
• Applicable for stateless app
• Vertical Pod Scaler (VPA)
• Controls the memory and cpu for pod
• Use cpu or memory as a trigger or use
custom metric
• Applicable for statefull apps
11
7
missing
factors
XIII. Observable
Apps should provide visibility about current health and metrics
XIV. Schedulable
Apps should provide guidance on expected resource constraints
XV. Upgradable
Apps must upgrade data formats from prior generations
XVI. Least privileged
Apps should provide guidance on expected resource constraints
XVII. Auditable
Apps should provide appropriate audit logs for compliance needs
XVIII. Access Control (Identity, Network, Scope, Certificates)
Protect app and resources from the world
XIX. Measurable
Apps usage should be measurable for quota or chargebacks
7 missing factors from 12 factor application
Observable: Application health (F#XIII)
Know your application health
• Kubernetes probes
• Is the app ready to accept
traffic?: Readiness
• Is the app responsive? :
Liveliness
• Is this enough?
• What about transactions,
traffic, memory usage ?
livenessProbe:
# an http probe
httpGet:
path: /healthcheck
port: 8080
initialDelaySeconds: 15
timeoutSeconds: 1
readinessProbe:
# an http probe
httpGet:
path: /readiness
port: 8080
initialDelaySeconds: 20
periodSeconds: 5
Schedulable: Resource requests, limits, &
quotas (F#XIV)
Cluster
Guarantee resources for your containers: Specify request and limits for the compute resources
CPU request: 150 CPU limit: 200
Guaranteed
CPU
Throttle limit
for K8
Max CPU resource for
container
CPU request: 0 CPU limit:0
Max CPU resource for
container
No request and limits are set. It defaults to 0
No guarantees, pods can be preempted any time
Once quota in a namespace for compute resources set, the users are forced to set requests or
limits for those values
Set resource quota
Namespace 1
Resource Quota :
CPU Limit:500mi
Memory Limit: 1024
MIB
Namespace 2
Resource Quota:
CPU Limit:500mi
Memory Limit: 1024
MIB
Upgradable (F#XV)
Applications should be able to roll out updates for cases where backward compatible updates ( security or
feature updates )needs to be made
minReadySeconds: 5
strategy:
# indicate which strategy
# rolling update
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
Least Privilege (F#XVI)
Cluster
Limit container access to hosts. Every permission is an attack vector
• Use Pod Security Policy and Network Policy to
• Limit access to filesystem
• Limit access to Kernel capabilities
• Use a non-privileged user
• Limit access to volume types
• Limit access to ports
container
container
container
container
#sample-psp.yaml
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: example
spec:
privileged: false
# Don't allow
# privileged pods!
# The rest fills in some
# required fields.
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
runAsUser:
rule: RunAsAny
fsGroup:
rule: RunAsAny
volumes:
- '*'
Compromised
Auditable (F#XVII)
• Know WHAT/WHEN/WHO/WHERE for all CRUD operations
• Chronological set of records documenting sequence of events affecting
system and application by users or components
• Use cloud agnostic industry standard format – CADF (Cloud Auditing Data
Federation)
• Control the quantity of logs
CADF event:
<initiator_id>: ID of the user that performed the operation
<target_uri>: CADF specific target URI, (for example: data/security/project)
<action>: The action being performed, typically: <operation>. <resource_type>
Access Control -Identity, Network, Scope
(F#XVIII )
Protect app and resources from the world
• Authentication and Authorization
• Certificate Management
• Data Protection
• Network security
• Network policy
• Network Isolation
• Admission Controller
• Example: Image admission controller
Access Control: Identity, Network, Scope
(F#XVIII)
Ensure secure communication
• Generate Certificates
• Enable TLS / mTLS
• Manage Certificates
letsencrypt-stagingletsencrypt-prod icp-root-ca
signed
keypair
signed
keypair
Certificate Manager
signed
keypair
Issuer
Certificates
Secrets
1. Issuer creates Certificate
2. Certificate creates secret
IP: 9.37.239.158
Issuer: icp-root-ca
IP: 9.37.239.158
Issuer: icp-root-ca
Example.com
Issuer: letsencrypt-prod
# sample issuer.yaml
apiVersion: certmanager.k8s.io/v1alpha1
kind: Issuer
metadata:
name: demo1-nginx-ca
namespace: demo
spec:
ca:
secretName: demo1-nginx-ca-key-pair
# sample certificate.yaml
apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate
Metadata:
name: demo1-nginx-cert
spec:
secretName: demo1-nginx-cert
issuerRef:
name: demo1-nginx-ca
kind: Issuer
commonName: "foo1.bar
dnsNames:
foo1.bar1
Pod
3. Secret mounts to Pod
Measurable (F#XIX)
Know the cost of the application
• Compute resources allocated to run the containers should be measurable
• Org / department using the cluster should be accountable
Cluster
container
container
container
container
container
container
---
Dept/org 1 Dept /orgn
Total usage
Cluster containercontainercontainercontainer containercontainer
IT cost
Dept /org 2
---
---
So, What really makes
a production- ready
app?
20
A production grade application
Productio
n thinking
needs to
be
through
the entire
processAttention to
Building containers and what's inside the containers
Example: Factor I : codebase , Factor X: dev/prod parity,
Factor XV
Attention to
Kubernetes configuration
Example: Factor III: Config, Factor II Config, Factor XIV:
Schedulable
Attention to
Cloud provider configurations
Example XII: Observable, Example: XVIII: Access Control.
Factor XIX:: Measurable
Enough
talking, let’s
see it LIVE!
22
• Self-service rich catalog of IBM MW
• Helm based parameterized install to simplify complex
K8 apps
• Logging : ELK + filebeat
• Monitoring : Prometheus + Grafana
• Usage : IBM Metering Service
• IBM Vulnerability Advisor
• IBM Mutation Advisor
• Authentication/ Authorization
• Certificate Management
• Network security
• Audit trail for any CRUD operations
• Team based organization of resources
Enterprise Content Catalog
Open Source and IBM Middleware, DevOps,
Data, Analytics, and AI Software
Core Operational Services
Logging, Monitoring, Metering, Security, Alerting
Kubernetes Container
Orchestration Platform
IBM Z
Choice of
infrastructure:
All communication enabled over TLS. Data
secured in transit and at rest
Provides the capabilities to run containerized application in
secure, scalable and resilient environment
IBM Cloud Private (ICP)
Links from the talk
Kubernetes & 12-factor apps
7 missing factors from 12 factor application
Modularizing your applications
25
Learn
more in
our new
book!
#7678A: Tech Talk:
Deploying Kubernetes in
the Enterprise (with the
authors)
When: Wednesday, 11:30
AM - 12:10 PM
Where: Table Top Tap Room
at the Metreon | Code Cafe
Tech Talks Area
Get a signed copy with all
of the authors at the Code
Café Mezzaine on
Wednesday (7 – 7:30PM)!
ibm.biz/BdYA4i >Now available online compliments of IBM:
Need Details on signing

More Related Content

What's hot

Using Kubernetes to make cellular data plans cheaper for 50M users
Using Kubernetes to make cellular data plans cheaper for 50M usersUsing Kubernetes to make cellular data plans cheaper for 50M users
Using Kubernetes to make cellular data plans cheaper for 50M usersMirantis
 
Pivotal Cloud Foundry 2.1: Making Transformation Real Webinar
Pivotal Cloud Foundry 2.1: Making Transformation Real WebinarPivotal Cloud Foundry 2.1: Making Transformation Real Webinar
Pivotal Cloud Foundry 2.1: Making Transformation Real WebinarVMware Tanzu
 
Spring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - BostonSpring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - BostonVMware Tanzu
 
Kubecon US 2019: Kubernetes Multitenancy WG Deep Dive
Kubecon US 2019: Kubernetes Multitenancy WG Deep DiveKubecon US 2019: Kubernetes Multitenancy WG Deep Dive
Kubecon US 2019: Kubernetes Multitenancy WG Deep DiveSanjeev Rampal
 
Application Modernization with PKS / Kubernetes
Application Modernization with PKS / KubernetesApplication Modernization with PKS / Kubernetes
Application Modernization with PKS / KubernetesPaul Czarkowski
 
Containers and microservices for realists
Containers and microservices for realistsContainers and microservices for realists
Containers and microservices for realistsKarthik Gaekwad
 
Successful Patterns for running platforms
Successful Patterns for running platformsSuccessful Patterns for running platforms
Successful Patterns for running platformsPaul Czarkowski
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture stylesAraf Karsh Hamid
 
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017Andrew Ripka
 
Migrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMixMigrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMixRohit Kelapure
 
DCEU 18: Provisioning and Managing Storage for Docker Containers
DCEU 18: Provisioning and Managing Storage for Docker ContainersDCEU 18: Provisioning and Managing Storage for Docker Containers
DCEU 18: Provisioning and Managing Storage for Docker ContainersDocker, Inc.
 
DCEU 18: Designing a Global Centralized Container Platform for a Multi-Cluste...
DCEU 18: Designing a Global Centralized Container Platform for a Multi-Cluste...DCEU 18: Designing a Global Centralized Container Platform for a Multi-Cluste...
DCEU 18: Designing a Global Centralized Container Platform for a Multi-Cluste...Docker, Inc.
 
OneAPI Series 2 Webinar - 9th, Dec-20
OneAPI Series 2 Webinar - 9th, Dec-20OneAPI Series 2 Webinar - 9th, Dec-20
OneAPI Series 2 Webinar - 9th, Dec-20Tyrone Systems
 
Cloudfoundry Introduction
Cloudfoundry IntroductionCloudfoundry Introduction
Cloudfoundry IntroductionYitao Jiang
 
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsMonitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsNima Badiey
 
V mware white paper virtualizing business-critical applications with confidence
V mware white paper  virtualizing business-critical applications with confidenceV mware white paper  virtualizing business-critical applications with confidence
V mware white paper virtualizing business-critical applications with confidenceReadWrite
 
Transforming Application Delivery with PaaS and Linux Containers
Transforming Application Delivery with PaaS and Linux ContainersTransforming Application Delivery with PaaS and Linux Containers
Transforming Application Delivery with PaaS and Linux ContainersGiovanni Galloro
 
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server Simone Morellato
 

What's hot (20)

Using Kubernetes to make cellular data plans cheaper for 50M users
Using Kubernetes to make cellular data plans cheaper for 50M usersUsing Kubernetes to make cellular data plans cheaper for 50M users
Using Kubernetes to make cellular data plans cheaper for 50M users
 
Pivotal Cloud Foundry 2.1: Making Transformation Real Webinar
Pivotal Cloud Foundry 2.1: Making Transformation Real WebinarPivotal Cloud Foundry 2.1: Making Transformation Real Webinar
Pivotal Cloud Foundry 2.1: Making Transformation Real Webinar
 
Spring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - BostonSpring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - Boston
 
Kubecon US 2019: Kubernetes Multitenancy WG Deep Dive
Kubecon US 2019: Kubernetes Multitenancy WG Deep DiveKubecon US 2019: Kubernetes Multitenancy WG Deep Dive
Kubecon US 2019: Kubernetes Multitenancy WG Deep Dive
 
Application Modernization with PKS / Kubernetes
Application Modernization with PKS / KubernetesApplication Modernization with PKS / Kubernetes
Application Modernization with PKS / Kubernetes
 
Containers and microservices for realists
Containers and microservices for realistsContainers and microservices for realists
Containers and microservices for realists
 
Successful Patterns for running platforms
Successful Patterns for running platformsSuccessful Patterns for running platforms
Successful Patterns for running platforms
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture styles
 
Enabling NFV features in kubernetes
Enabling NFV features in kubernetesEnabling NFV features in kubernetes
Enabling NFV features in kubernetes
 
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
 
Migrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMixMigrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMix
 
DCEU 18: Provisioning and Managing Storage for Docker Containers
DCEU 18: Provisioning and Managing Storage for Docker ContainersDCEU 18: Provisioning and Managing Storage for Docker Containers
DCEU 18: Provisioning and Managing Storage for Docker Containers
 
DCEU 18: Designing a Global Centralized Container Platform for a Multi-Cluste...
DCEU 18: Designing a Global Centralized Container Platform for a Multi-Cluste...DCEU 18: Designing a Global Centralized Container Platform for a Multi-Cluste...
DCEU 18: Designing a Global Centralized Container Platform for a Multi-Cluste...
 
OneAPI Series 2 Webinar - 9th, Dec-20
OneAPI Series 2 Webinar - 9th, Dec-20OneAPI Series 2 Webinar - 9th, Dec-20
OneAPI Series 2 Webinar - 9th, Dec-20
 
Build Robust Blockchain Services with Hyperledger and Containers
Build Robust Blockchain Services with Hyperledger and ContainersBuild Robust Blockchain Services with Hyperledger and Containers
Build Robust Blockchain Services with Hyperledger and Containers
 
Cloudfoundry Introduction
Cloudfoundry IntroductionCloudfoundry Introduction
Cloudfoundry Introduction
 
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsMonitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
 
V mware white paper virtualizing business-critical applications with confidence
V mware white paper  virtualizing business-critical applications with confidenceV mware white paper  virtualizing business-critical applications with confidence
V mware white paper virtualizing business-critical applications with confidence
 
Transforming Application Delivery with PaaS and Linux Containers
Transforming Application Delivery with PaaS and Linux ContainersTransforming Application Delivery with PaaS and Linux Containers
Transforming Application Delivery with PaaS and Linux Containers
 
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server
 

Similar to Kube con china_2019_7 missing factors for your production-quality 12-factor apps

Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
Edge 2016 Session 1886  Building your own docker container cloud on ibm power...Edge 2016 Session 1886  Building your own docker container cloud on ibm power...
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...Yong Feng
 
Java Development on Bluemix
Java Development on BluemixJava Development on Bluemix
Java Development on BluemixRam Vennam
 
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the CloudMongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the CloudMongoDB
 
Modernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-ArchitectModernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-ArchitectDevOps.com
 
.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp.NET Cloud-Native Bootcamp
.NET Cloud-Native BootcampVMware Tanzu
 
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...OpenWhisk
 
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...Jack-Junjie Cai
 
12 Factor App Methodology
12 Factor App Methodology12 Factor App Methodology
12 Factor App Methodologylaeshin park
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015WaveMaker, Inc.
 
The twelve factor app
The twelve factor appThe twelve factor app
The twelve factor appRavi Okade
 
15-factor-apps.pdf
15-factor-apps.pdf15-factor-apps.pdf
15-factor-apps.pdfNilesh Gule
 
Private Cloud with Open Stack, Docker
Private Cloud with Open Stack, DockerPrivate Cloud with Open Stack, Docker
Private Cloud with Open Stack, DockerDavinder Kohli
 
Docker Roadshow 2016
Docker Roadshow 2016Docker Roadshow 2016
Docker Roadshow 2016Docker, Inc.
 
Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps
 Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps
Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise AppsMichael Elder
 
VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...
VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...
VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...VMworld
 
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-ServiceMigrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-ServiceDavid Currie
 
在小學有效運用雲端電腦以促進電子學習(第一節筆記)
在小學有效運用雲端電腦以促進電子學習(第一節筆記)在小學有效運用雲端電腦以促進電子學習(第一節筆記)
在小學有效運用雲端電腦以促進電子學習(第一節筆記)Tsz Wing Chu
 

Similar to Kube con china_2019_7 missing factors for your production-quality 12-factor apps (20)

Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
Edge 2016 Session 1886  Building your own docker container cloud on ibm power...Edge 2016 Session 1886  Building your own docker container cloud on ibm power...
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
 
Java Development on Bluemix
Java Development on BluemixJava Development on Bluemix
Java Development on Bluemix
 
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the CloudMongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
 
Modernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-ArchitectModernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-Architect
 
.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp
 
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
 
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
 
12 Factor App Methodology
12 Factor App Methodology12 Factor App Methodology
12 Factor App Methodology
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
 
Docker12 factor
Docker12 factorDocker12 factor
Docker12 factor
 
Un-clouding the cloud
Un-clouding the cloudUn-clouding the cloud
Un-clouding the cloud
 
The twelve factor app
The twelve factor appThe twelve factor app
The twelve factor app
 
Red hat cloud platforms
Red hat cloud platformsRed hat cloud platforms
Red hat cloud platforms
 
15-factor-apps.pdf
15-factor-apps.pdf15-factor-apps.pdf
15-factor-apps.pdf
 
Private Cloud with Open Stack, Docker
Private Cloud with Open Stack, DockerPrivate Cloud with Open Stack, Docker
Private Cloud with Open Stack, Docker
 
Docker Roadshow 2016
Docker Roadshow 2016Docker Roadshow 2016
Docker Roadshow 2016
 
Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps
 Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps
Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps
 
VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...
VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...
VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...
 
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-ServiceMigrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
 
在小學有效運用雲端電腦以促進電子學習(第一節筆記)
在小學有效運用雲端電腦以促進電子學習(第一節筆記)在小學有效運用雲端電腦以促進電子學習(第一節筆記)
在小學有效運用雲端電腦以促進電子學習(第一節筆記)
 

More from Shikha Srivastava

ADDO_2022_SRE Architectural Patterns_Nov10.pptx
ADDO_2022_SRE Architectural Patterns_Nov10.pptxADDO_2022_SRE Architectural Patterns_Nov10.pptx
ADDO_2022_SRE Architectural Patterns_Nov10.pptxShikha Srivastava
 
DevOpsEnterpriseSummit_SaaSAnd DisasterRecovery.pptx
DevOpsEnterpriseSummit_SaaSAnd DisasterRecovery.pptxDevOpsEnterpriseSummit_SaaSAnd DisasterRecovery.pptx
DevOpsEnterpriseSummit_SaaSAnd DisasterRecovery.pptxShikha Srivastava
 
WITS 2022_ModernizationAndInfrastructureAsCode.pptx
WITS 2022_ModernizationAndInfrastructureAsCode.pptxWITS 2022_ModernizationAndInfrastructureAsCode.pptx
WITS 2022_ModernizationAndInfrastructureAsCode.pptxShikha Srivastava
 
Using Cloud-Native and SRE Principles to Achieve Speed and Resiliency
Using Cloud-Native and SRE Principles to Achieve Speed and ResiliencyUsing Cloud-Native and SRE Principles to Achieve Speed and Resiliency
Using Cloud-Native and SRE Principles to Achieve Speed and ResiliencyShikha Srivastava
 
How kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updatedHow kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updatedShikha Srivastava
 
Managing integration in a multi cluster world
Managing integration in a multi cluster worldManaging integration in a multi cluster world
Managing integration in a multi cluster worldShikha Srivastava
 
Helm summit 2019_handling large number of charts_sept 10
Helm summit 2019_handling large number of charts_sept 10Helm summit 2019_handling large number of charts_sept 10
Helm summit 2019_handling large number of charts_sept 10Shikha Srivastava
 
Bluemix application monitoring
Bluemix application monitoring Bluemix application monitoring
Bluemix application monitoring Shikha Srivastava
 
Modernization: Moving workloads to cloud
Modernization: Moving workloads to cloud Modernization: Moving workloads to cloud
Modernization: Moving workloads to cloud Shikha Srivastava
 
Kibana globalization at the RTP meetup
Kibana globalization at the RTP meetupKibana globalization at the RTP meetup
Kibana globalization at the RTP meetupShikha Srivastava
 
Localizing kibana for the global language landscape
Localizing kibana for the global language landscapeLocalizing kibana for the global language landscape
Localizing kibana for the global language landscapeShikha Srivastava
 
Developing and Deploying Microservices to IBM Cloud Private
Developing and Deploying Microservices to IBM Cloud PrivateDeveloping and Deploying Microservices to IBM Cloud Private
Developing and Deploying Microservices to IBM Cloud PrivateShikha Srivastava
 
4789 creating production-ready, secure and scalable applications in ibm cloud...
4789 creating production-ready, secure and scalable applications in ibm cloud...4789 creating production-ready, secure and scalable applications in ibm cloud...
4789 creating production-ready, secure and scalable applications in ibm cloud...Shikha Srivastava
 
Panelist at women breakfast discussing latest technology trends at Elasticon
Panelist at women breakfast discussing latest technology trends at Elasticon Panelist at women breakfast discussing latest technology trends at Elasticon
Panelist at women breakfast discussing latest technology trends at Elasticon Shikha Srivastava
 

More from Shikha Srivastava (15)

ADDO_2022_SRE Architectural Patterns_Nov10.pptx
ADDO_2022_SRE Architectural Patterns_Nov10.pptxADDO_2022_SRE Architectural Patterns_Nov10.pptx
ADDO_2022_SRE Architectural Patterns_Nov10.pptx
 
DevOpsEnterpriseSummit_SaaSAnd DisasterRecovery.pptx
DevOpsEnterpriseSummit_SaaSAnd DisasterRecovery.pptxDevOpsEnterpriseSummit_SaaSAnd DisasterRecovery.pptx
DevOpsEnterpriseSummit_SaaSAnd DisasterRecovery.pptx
 
WITS 2022_ModernizationAndInfrastructureAsCode.pptx
WITS 2022_ModernizationAndInfrastructureAsCode.pptxWITS 2022_ModernizationAndInfrastructureAsCode.pptx
WITS 2022_ModernizationAndInfrastructureAsCode.pptx
 
Using Cloud-Native and SRE Principles to Achieve Speed and Resiliency
Using Cloud-Native and SRE Principles to Achieve Speed and ResiliencyUsing Cloud-Native and SRE Principles to Achieve Speed and Resiliency
Using Cloud-Native and SRE Principles to Achieve Speed and Resiliency
 
How kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updatedHow kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updated
 
Managing integration in a multi cluster world
Managing integration in a multi cluster worldManaging integration in a multi cluster world
Managing integration in a multi cluster world
 
Helm summit 2019_handling large number of charts_sept 10
Helm summit 2019_handling large number of charts_sept 10Helm summit 2019_handling large number of charts_sept 10
Helm summit 2019_handling large number of charts_sept 10
 
Why Ibm cloud private
Why Ibm cloud private Why Ibm cloud private
Why Ibm cloud private
 
Bluemix application monitoring
Bluemix application monitoring Bluemix application monitoring
Bluemix application monitoring
 
Modernization: Moving workloads to cloud
Modernization: Moving workloads to cloud Modernization: Moving workloads to cloud
Modernization: Moving workloads to cloud
 
Kibana globalization at the RTP meetup
Kibana globalization at the RTP meetupKibana globalization at the RTP meetup
Kibana globalization at the RTP meetup
 
Localizing kibana for the global language landscape
Localizing kibana for the global language landscapeLocalizing kibana for the global language landscape
Localizing kibana for the global language landscape
 
Developing and Deploying Microservices to IBM Cloud Private
Developing and Deploying Microservices to IBM Cloud PrivateDeveloping and Deploying Microservices to IBM Cloud Private
Developing and Deploying Microservices to IBM Cloud Private
 
4789 creating production-ready, secure and scalable applications in ibm cloud...
4789 creating production-ready, secure and scalable applications in ibm cloud...4789 creating production-ready, secure and scalable applications in ibm cloud...
4789 creating production-ready, secure and scalable applications in ibm cloud...
 
Panelist at women breakfast discussing latest technology trends at Elasticon
Panelist at women breakfast discussing latest technology trends at Elasticon Panelist at women breakfast discussing latest technology trends at Elasticon
Panelist at women breakfast discussing latest technology trends at Elasticon
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Kube con china_2019_7 missing factors for your production-quality 12-factor apps

  • 1.
  • 2. 7 Missing Factors for Your Production-Quality 12-Factor Apps Shikha Srivastava IBM Senior Technical Staff Member @shikhasthoughts Michael Elder IBM Distinguished Engineer @mdelder
  • 3. What is Ready for production application • Secure • Installation, authentication and access • Resilient, Highly Available and scale • Repeated deployment • with safe upgrades and configuration changes • Performance • Observable • Upgradeable • more ….. • And AGILE too
  • 4. What is a 12-factor app? • “12-Factor” is a software methodology for building scalable microservice applications • Originally created by Heroku • Best practices designed to enable applications to be built with portability, resilience, and scalability when deployed to the web Kubernetes & 12-factor apps
  • 5. 5 I. Codebase One codebase tracked in revision control, many deploys II. Dependencies Explicitly declare and isolate dependencies III. Config Store config in the environment IV. Backing services Treat backing services as attached resources V. Build, release, run Strictly separate build and run stages VI. Processes Execute the app as one or more stateless processes VII. Port binding Export services via port binding VIII. Concurrency Scale out via the process model IX. Disposability Maximize robustness with fast startup and graceful shutdown X. Dev/prod parity Keep development, staging, and production as similar as possible XI. Logs Treat logs as event streams XII. Admin processes Run admin/management tasks as one-off processes Why 12 factor apps? • Make it easier to run, scale, and deploy applications • Keep parity between development and production • Provide strict separation between build, release, and run stages
  • 6. I. Codebase One codebase tracked in revision control, many deploys II. Dependencies Explicitly declare and isolate dependencies III. Config Store config in the environment IV. Backing services Treat backing services as attached resources V. Build, release, run Strictly separate build and run stages VI. Processes Execute the app as one or more stateless processes VII. Port binding Export services via port binding VIII. Concurrency Scale out via the process model IX. Disposability Maximize robustness with fast startup and graceful shutdown X. Parity between dev & prod Keep development, staging, and production as similar as possible XI. Logs Treat logs as event streams XII. Admin processes Run admin/management tasks as one-off processes Code Deploy Operate
  • 7. Developers dream – Code factors 7 • One codebase for my application tracked in revision that runs anywhere: build, ship and run anywhere AND • I can offload deployment, HA, scaling, upgrade strategy and not worry about it Test and automati on Release AGILE Design • Container Images built from Dockerfiles using trusted small image. Kubernetes Deployments, etc managed as YAML (F#I- Codebase) • Having a strong artifact-driven model makes it easier to follow a Continuous Delivery lifecycle (F#V- Build, release, run) • Using the same images and YAML objects make it easier for dev teams to match what’s running in production (F#X- Dev/prod parity) Develop
  • 8. Deploy factors Pod (Single IP Address) 8 • ConfigMaps and Secrets managed in source repositories or built dynamically via commands (F#III: Config ). Containers retrieve during runtime • A collection of Pods can expose or consume Services via Service port bindings (F#IV : Backing Services, F#VII: Port binding) • Container image runs as a container process in a Pod with other containers (F#VI: Processes ) • Explicitly declare and isolate dependencies(F#II: Dependencies) • Running app as a container makes it possible to capture all logs, metrics, and other management functions in a consistent way (F#XII: Admin Process ) Pod (Single IP Address) Volume Volume container container container Volume Secret ConfigMap Service Persistent Volume
  • 9. Operate factors: Concurrency (F#VIII) & Disposability (F#IX) • Ensure scale for your app • Replica set ensures specified number of pods are always running kind: Deployment metadata: name: nginx spec: replicas: 2 template: metadata: labels: service: http-server spec: containers: - name: nginx image: nginx:1.10.2 imagePullPolicy: IfNotPresent ports: - containerPort: 80 • Is this enough? Remember load is never constant in the real world
  • 10. Operate factors: Concurrency (F#VIII) Leverage auto-scaling to automate computation resources based on load • Horizontal Pod Scaler (HPA) • Controls the number of replicas • Use cpu or memory as a trigger or use custom metric • Applicable for stateless app • Vertical Pod Scaler (VPA) • Controls the memory and cpu for pod • Use cpu or memory as a trigger or use custom metric • Applicable for statefull apps
  • 11. 11 7 missing factors XIII. Observable Apps should provide visibility about current health and metrics XIV. Schedulable Apps should provide guidance on expected resource constraints XV. Upgradable Apps must upgrade data formats from prior generations XVI. Least privileged Apps should provide guidance on expected resource constraints XVII. Auditable Apps should provide appropriate audit logs for compliance needs XVIII. Access Control (Identity, Network, Scope, Certificates) Protect app and resources from the world XIX. Measurable Apps usage should be measurable for quota or chargebacks 7 missing factors from 12 factor application
  • 12. Observable: Application health (F#XIII) Know your application health • Kubernetes probes • Is the app ready to accept traffic?: Readiness • Is the app responsive? : Liveliness • Is this enough? • What about transactions, traffic, memory usage ? livenessProbe: # an http probe httpGet: path: /healthcheck port: 8080 initialDelaySeconds: 15 timeoutSeconds: 1 readinessProbe: # an http probe httpGet: path: /readiness port: 8080 initialDelaySeconds: 20 periodSeconds: 5
  • 13. Schedulable: Resource requests, limits, & quotas (F#XIV) Cluster Guarantee resources for your containers: Specify request and limits for the compute resources CPU request: 150 CPU limit: 200 Guaranteed CPU Throttle limit for K8 Max CPU resource for container CPU request: 0 CPU limit:0 Max CPU resource for container No request and limits are set. It defaults to 0 No guarantees, pods can be preempted any time Once quota in a namespace for compute resources set, the users are forced to set requests or limits for those values Set resource quota Namespace 1 Resource Quota : CPU Limit:500mi Memory Limit: 1024 MIB Namespace 2 Resource Quota: CPU Limit:500mi Memory Limit: 1024 MIB
  • 14. Upgradable (F#XV) Applications should be able to roll out updates for cases where backward compatible updates ( security or feature updates )needs to be made minReadySeconds: 5 strategy: # indicate which strategy # rolling update type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 1
  • 15. Least Privilege (F#XVI) Cluster Limit container access to hosts. Every permission is an attack vector • Use Pod Security Policy and Network Policy to • Limit access to filesystem • Limit access to Kernel capabilities • Use a non-privileged user • Limit access to volume types • Limit access to ports container container container container #sample-psp.yaml apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: example spec: privileged: false # Don't allow # privileged pods! # The rest fills in some # required fields. seLinux: rule: RunAsAny supplementalGroups: rule: RunAsAny runAsUser: rule: RunAsAny fsGroup: rule: RunAsAny volumes: - '*' Compromised
  • 16. Auditable (F#XVII) • Know WHAT/WHEN/WHO/WHERE for all CRUD operations • Chronological set of records documenting sequence of events affecting system and application by users or components • Use cloud agnostic industry standard format – CADF (Cloud Auditing Data Federation) • Control the quantity of logs CADF event: <initiator_id>: ID of the user that performed the operation <target_uri>: CADF specific target URI, (for example: data/security/project) <action>: The action being performed, typically: <operation>. <resource_type>
  • 17. Access Control -Identity, Network, Scope (F#XVIII ) Protect app and resources from the world • Authentication and Authorization • Certificate Management • Data Protection • Network security • Network policy • Network Isolation • Admission Controller • Example: Image admission controller
  • 18. Access Control: Identity, Network, Scope (F#XVIII) Ensure secure communication • Generate Certificates • Enable TLS / mTLS • Manage Certificates letsencrypt-stagingletsencrypt-prod icp-root-ca signed keypair signed keypair Certificate Manager signed keypair Issuer Certificates Secrets 1. Issuer creates Certificate 2. Certificate creates secret IP: 9.37.239.158 Issuer: icp-root-ca IP: 9.37.239.158 Issuer: icp-root-ca Example.com Issuer: letsencrypt-prod # sample issuer.yaml apiVersion: certmanager.k8s.io/v1alpha1 kind: Issuer metadata: name: demo1-nginx-ca namespace: demo spec: ca: secretName: demo1-nginx-ca-key-pair # sample certificate.yaml apiVersion: certmanager.k8s.io/v1alpha1 kind: Certificate Metadata: name: demo1-nginx-cert spec: secretName: demo1-nginx-cert issuerRef: name: demo1-nginx-ca kind: Issuer commonName: "foo1.bar dnsNames: foo1.bar1 Pod 3. Secret mounts to Pod
  • 19. Measurable (F#XIX) Know the cost of the application • Compute resources allocated to run the containers should be measurable • Org / department using the cluster should be accountable Cluster container container container container container container --- Dept/org 1 Dept /orgn Total usage Cluster containercontainercontainercontainer containercontainer IT cost Dept /org 2 --- ---
  • 20. So, What really makes a production- ready app? 20
  • 21. A production grade application Productio n thinking needs to be through the entire processAttention to Building containers and what's inside the containers Example: Factor I : codebase , Factor X: dev/prod parity, Factor XV Attention to Kubernetes configuration Example: Factor III: Config, Factor II Config, Factor XIV: Schedulable Attention to Cloud provider configurations Example XII: Observable, Example: XVIII: Access Control. Factor XIX:: Measurable
  • 23. • Self-service rich catalog of IBM MW • Helm based parameterized install to simplify complex K8 apps • Logging : ELK + filebeat • Monitoring : Prometheus + Grafana • Usage : IBM Metering Service • IBM Vulnerability Advisor • IBM Mutation Advisor • Authentication/ Authorization • Certificate Management • Network security • Audit trail for any CRUD operations • Team based organization of resources Enterprise Content Catalog Open Source and IBM Middleware, DevOps, Data, Analytics, and AI Software Core Operational Services Logging, Monitoring, Metering, Security, Alerting Kubernetes Container Orchestration Platform IBM Z Choice of infrastructure: All communication enabled over TLS. Data secured in transit and at rest Provides the capabilities to run containerized application in secure, scalable and resilient environment IBM Cloud Private (ICP)
  • 24. Links from the talk Kubernetes & 12-factor apps 7 missing factors from 12 factor application Modularizing your applications
  • 25. 25 Learn more in our new book! #7678A: Tech Talk: Deploying Kubernetes in the Enterprise (with the authors) When: Wednesday, 11:30 AM - 12:10 PM Where: Table Top Tap Room at the Metreon | Code Cafe Tech Talks Area Get a signed copy with all of the authors at the Code Café Mezzaine on Wednesday (7 – 7:30PM)! ibm.biz/BdYA4i >Now available online compliments of IBM: Need Details on signing

Editor's Notes

  1. Fewer worked on my laptop arguments Marathon analogy – Keep parity between development and production 12 Factor Apps is focused on making it easier to run, scale and deploy applications “The twelve-factor app uses strict separation between the build, release, and run stages. For example, it is impossible to make changes to the code at runtime, since there is no way to propagate those changes back to the build stage.”