SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Downloaden Sie, um offline zu lesen
Senior Director Cloud Architecture, WSO2
@lakwarus
Deploying Applications in K8S and
Docker
Lakmal Warusawithana
Old Way
Install Application on
New Way
Deploy as a Container
Docker
Docker provides an easy-to-use
packaging model to bundle the
application
Reality
However in many cases, a single
container is not enough to run an
application
K8S
Kubernetes is an open source
container orchestration system that
helps to automate deployment,
scaling, and management of
containerized applications.
K8S Architecture (From Above 5000 ft)
K8S Core Primitive
Small group of containers and
volume
Tightly coupled
● The atom of replication
and placement
Logical host for containers
● Echo pod get an IP address
● Share data: localhost,
volume, IPC, etc.
K8S POD
Storage automatically
attached to a Pod
● Local storage
● Cloud block storage
○ AWS EBS, GCE persistent
● Cluster storage
○ NSF, Gluster
○ iSCSI, Cinder
● Special volumes
○ Git repo, secret
K8S Volume
Ensures N copies of Pod
● If too few, start new one
● If too many, kill some
Enables self-healing
Facilitates auto scaling
K8S Replication Controller
Group of pods thats work
together
DNS name
Load balanced: name map to
a stable virtual IP
Decoupled from Pods and
Replication controllers
K8S Service
Secrets: Tokens, credentials,
certs, etc.
Don’t put them in a container
image.
Inject them as virtual volume
into pods
● Not backed into images
nor pod config
● Kept in memory, never
touches disk
K8S Secret
Multi tenancy in K8S
is namespace has its own
● Resources (Pods, Services,
etc.)
● Policies (who can or
cannot perform an action
in their tenancy)
● Constrain (how much
quota, etc.)
K8S Namespace
12-factor says config comes
from the environment.
● Should not be baked into
Docker image
ConfigMap inject config as a
virtual volume into the Pods
● Late binding, live update
(atomic)
● Also available as env vars
K8S ConfigMap
Services are assumed L4
Ingress in L7
Ingress maps HTTP/HTTPS
incoming traffic to backend
services
● By host headers
● By URL paths
K8S Ingress
K8S Rolling Update
K8S Rolling Update
K8S Rolling Update
K8S Rolling Update
K8S Rolling Update
K8S Rolling Update
K8S Rolling Update
K8S Rolling Update
Rolling update too imperative
Deployment manage RC
changes for you
● Kubectl edit /apply is all
you need
Aggregate stats
Can have multiple updates
inflight
K8S Deployment
How to run pod in every
node? Or subset of nodes?
Daemonset
● Like ReplicationController
● Do one thing
● Don’t overload
Which node is a selector
K8S Daemonset
Give Pods time to clean up
Catch SIGTERM, clean-up exit
ASAP
Pods status Terminating
30 seconds by default
● Finish inflight operation
● Flush to disk
● Log state
K8S Graceful Termination
Automatically scale RCs to a
target utilization
● CPU utilization for now
Operate within user-defined
min/max bound
Set it and forget it
K8S Horizontal Pod Autoscaler
Demo: Hello World with kubectl
● Draft
● Gitkube
● Helm
● Ksonnet
● Skaffold
● Metaparticle
● Ballerina
Tools and framework for K8S
● Draft
● Gitkube
● Helm
● Ksonnet
● Skaffold
● Metaparticle
● Ballerina
Tools and framework for K8S
● deploy code to k8s cluster (automates
build-push-deploy)
● deploy code in draft-pack supported
languages without writing dockerfile or
k8s manifests
● needs draft cli, helm cli, tiller on cluster,
local docker, docker registry
● Draft
● Gitkube
● Helm
● Ksonnet
● Skaffold
● Metaparticle
● Ballerina
Tools and framework for K8S
● deploy code to k8s cluster (automates
build-push-deploy)
● git push to deploy, no dependencies on
your local machine
● needs dockerfile, k8s manifests in the
git repo, gitkube on cluster
● Draft
● Gitkube
● Helm
● Ksonnet
● Skaffold
● Metaparticle
● Ballerina
Tools and framework for K8S
● deploy and manage charts (collection
of k8s objects defining an application)
on a k8s cluster
● ready made charts for many common
applications, like mysql, mediawiki etc.
● needs helm cli, tiller on cluster, chart
definition locally or from a repo
● Draft
● Gitkube
● Helm
● Ksonnet
● Skaffold
● Metaparticle
● Ballerina
Tools and framework for K8S
● define k8s manifests in jsonnet, deploy
them to k8s cluster
● reusable components for common
patterns and stacks, like
deployment+service, redis
● needs jsonnet knowledge, ksonnet cli
● Draft
● Gitkube
● Helm
● Ksonnet
● Skaffold
● Metaparticle
● Ballerina
Tools and framework for K8S
● deploy code to k8s cluster (automates
build-push-deploy)
● watches source code and triggers
build-push-deploy when change
happens, configurable pipeline
● needs skaffold cli, dockerfile, k8s
manifests, skaffold manifest in folder,
local docker, docker registry
● Draft
● Gitkube
● Helm
● Ksonnet
● Skaffold
● Metaparticle
● Ballerina
Tools and framework for K8S
● deploy your code in metaparticle
supported languages to k8s
(automates build-push-deploy)
● define containerizing and deploying to
k8s in the language itself, in an
idiomatic way, without writing
dockerfile or k8s yaml
● needs metaparticle library for
language, local docker
● Draft
● Gitkube
● Helm
● Ksonnet
● Skaffold
● Metaparticle
● Ballerina
Tools and framework for K8S
● Generate docker images, k8s artifacts
depending on annotation defined in
the code.
● Support many Kubernetes
functionalities like; all kind of
Kubernetes services, deployment,
ingress, secrets, persistent volumes,
config maps, liveness probe and
horizontal pod autoscaling.
Demo: Metaparticles with K8S
Demo: Ballerina with K8S
● https://kubernetes.io/docs/concepts
● https://www.youtube.com/watch?v=A4A7ybtQujA
● https://www.slideshare.net/DanielSmith272/whats-new-in-k
ubernetes
● https://blog.hasura.io/draft-vs-gitkube-vs-helm-vs-ksonnet
-vs-metaparticle-vs-skaffold-f5aa9561f948
References
THANK YOU
wso2.com

Weitere ähnliche Inhalte

Was ist angesagt?

Aptira presents OpenStack Load Balancing as a Service at Banglore India OSUG ...
Aptira presents OpenStack Load Balancing as a Service at Banglore India OSUG ...Aptira presents OpenStack Load Balancing as a Service at Banglore India OSUG ...
Aptira presents OpenStack Load Balancing as a Service at Banglore India OSUG ...
OpenStack
 
OpenStack MagnetoDB. Atlanta Summit 2014
OpenStack MagnetoDB. Atlanta Summit 2014OpenStack MagnetoDB. Atlanta Summit 2014
OpenStack MagnetoDB. Atlanta Summit 2014
Ilya Sviridov
 

Was ist angesagt? (20)

Apache Cassandra Lunch #72: Databricks and Cassandra
Apache Cassandra Lunch #72: Databricks and CassandraApache Cassandra Lunch #72: Databricks and Cassandra
Apache Cassandra Lunch #72: Databricks and Cassandra
 
Stream processing at Hotstar
Stream processing at HotstarStream processing at Hotstar
Stream processing at Hotstar
 
High Availability - Brett Thurber - ManageIQ Design Summit 2016
High Availability - Brett Thurber - ManageIQ Design Summit 2016High Availability - Brett Thurber - ManageIQ Design Summit 2016
High Availability - Brett Thurber - ManageIQ Design Summit 2016
 
Nova Updates - Kilo Edition
Nova Updates - Kilo EditionNova Updates - Kilo Edition
Nova Updates - Kilo Edition
 
Netflix and Containers: Not A Stranger Thing
Netflix and Containers:  Not A Stranger ThingNetflix and Containers:  Not A Stranger Thing
Netflix and Containers: Not A Stranger Thing
 
Keystone event processing pipeline on a dockerized microservices architecture
Keystone event processing pipeline on a dockerized microservices architectureKeystone event processing pipeline on a dockerized microservices architecture
Keystone event processing pipeline on a dockerized microservices architecture
 
Aptira presents OpenStack Load Balancing as a Service at Banglore India OSUG ...
Aptira presents OpenStack Load Balancing as a Service at Banglore India OSUG ...Aptira presents OpenStack Load Balancing as a Service at Banglore India OSUG ...
Aptira presents OpenStack Load Balancing as a Service at Banglore India OSUG ...
 
Streaming sql and druid
Streaming sql and druid Streaming sql and druid
Streaming sql and druid
 
Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...
 
Data Engineer's Lunch #46: Node.js and API calls
Data Engineer's Lunch #46: Node.js and API callsData Engineer's Lunch #46: Node.js and API calls
Data Engineer's Lunch #46: Node.js and API calls
 
Netflix Open Source Meetup Season 4 Episode 1
Netflix Open Source Meetup Season 4 Episode 1Netflix Open Source Meetup Season 4 Episode 1
Netflix Open Source Meetup Season 4 Episode 1
 
How Sysbee Manages Infrastructures and Provides Advanced Monitoring by Using ...
How Sysbee Manages Infrastructures and Provides Advanced Monitoring by Using ...How Sysbee Manages Infrastructures and Provides Advanced Monitoring by Using ...
How Sysbee Manages Infrastructures and Provides Advanced Monitoring by Using ...
 
Glance Updates - Liberty Edition
Glance Updates - Liberty EditionGlance Updates - Liberty Edition
Glance Updates - Liberty Edition
 
The Kubernetes Effect
The Kubernetes EffectThe Kubernetes Effect
The Kubernetes Effect
 
SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...
SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...
SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...
 
What next after microservices
What next after microservicesWhat next after microservices
What next after microservices
 
OpenStack MagnetoDB. Atlanta Summit 2014
OpenStack MagnetoDB. Atlanta Summit 2014OpenStack MagnetoDB. Atlanta Summit 2014
OpenStack MagnetoDB. Atlanta Summit 2014
 
Ceilometer Updates - Kilo Edition
Ceilometer Updates - Kilo EditionCeilometer Updates - Kilo Edition
Ceilometer Updates - Kilo Edition
 
Owain Perry (Just Giving) - Continuous Delivery of Windows Micro-Services in ...
Owain Perry (Just Giving) - Continuous Delivery of Windows Micro-Services in ...Owain Perry (Just Giving) - Continuous Delivery of Windows Micro-Services in ...
Owain Perry (Just Giving) - Continuous Delivery of Windows Micro-Services in ...
 
Dynomite - PerconaLive 2017
Dynomite  - PerconaLive 2017Dynomite  - PerconaLive 2017
Dynomite - PerconaLive 2017
 

Ähnlich wie [WSO2Con USA 2018] Deploying Applications in K8S and Docker

Patroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companionPatroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companion
Alexander Kukushkin
 

Ähnlich wie [WSO2Con USA 2018] Deploying Applications in K8S and Docker (20)

[WSO2Con EU 2018] Deploying Applications in K8S and Docker
[WSO2Con EU 2018] Deploying Applications in K8S and Docker[WSO2Con EU 2018] Deploying Applications in K8S and Docker
[WSO2Con EU 2018] Deploying Applications in K8S and Docker
 
[WSO2Con Asia 2018] Deploying Applications in K8S and Docker
[WSO2Con Asia 2018] Deploying Applications in K8S and Docker[WSO2Con Asia 2018] Deploying Applications in K8S and Docker
[WSO2Con Asia 2018] Deploying Applications in K8S and Docker
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
 
K8s from Zero to ~Hero~ Seasoned Beginner
K8s from Zero to ~Hero~ Seasoned BeginnerK8s from Zero to ~Hero~ Seasoned Beginner
K8s from Zero to ~Hero~ Seasoned Beginner
 
Kuberenetes - From Zero to Hero
Kuberenetes  - From Zero to HeroKuberenetes  - From Zero to Hero
Kuberenetes - From Zero to Hero
 
Running Production-Grade Kubernetes on AWS
Running Production-Grade Kubernetes on AWSRunning Production-Grade Kubernetes on AWS
Running Production-Grade Kubernetes on AWS
 
Kubernetes 1.12 Update and Container Security with Liz Rice
Kubernetes 1.12 Update and Container Security with Liz RiceKubernetes 1.12 Update and Container Security with Liz Rice
Kubernetes 1.12 Update and Container Security with Liz Rice
 
Unleashing k8 s to reduce complexities of an entire middleware platform
Unleashing k8 s to reduce complexities of an entire middleware platformUnleashing k8 s to reduce complexities of an entire middleware platform
Unleashing k8 s to reduce complexities of an entire middleware platform
 
OpenEBS hangout #4
OpenEBS hangout #4OpenEBS hangout #4
OpenEBS hangout #4
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
 
Patroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companionPatroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companion
 
Intro to Kubernetes
Intro to KubernetesIntro to Kubernetes
Intro to Kubernetes
 
reInvent 2021 Recap and k9s review
reInvent 2021 Recap and k9s reviewreInvent 2021 Recap and k9s review
reInvent 2021 Recap and k9s review
 
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companionPGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
 
kubernetes.pdf
kubernetes.pdfkubernetes.pdf
kubernetes.pdf
 
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremTo Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Introduction to istio
Introduction to istioIntroduction to istio
Introduction to istio
 
Cloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAP
Cloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAPCloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAP
Cloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAP
 
Kubernetes Logging
Kubernetes LoggingKubernetes Logging
Kubernetes Logging
 

Mehr von WSO2

Mehr von WSO2 (20)

Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
WSO2CON 2024 - Elevating the Integration Game to the Cloud
WSO2CON 2024 - Elevating the Integration Game to the CloudWSO2CON 2024 - Elevating the Integration Game to the Cloud
WSO2CON 2024 - Elevating the Integration Game to the Cloud
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 

Kürzlich hochgeladen

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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+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)

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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+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...
 
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...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

[WSO2Con USA 2018] Deploying Applications in K8S and Docker

  • 1. Senior Director Cloud Architecture, WSO2 @lakwarus Deploying Applications in K8S and Docker Lakmal Warusawithana
  • 3. New Way Deploy as a Container
  • 4. Docker Docker provides an easy-to-use packaging model to bundle the application
  • 5. Reality However in many cases, a single container is not enough to run an application
  • 6.
  • 7. K8S Kubernetes is an open source container orchestration system that helps to automate deployment, scaling, and management of containerized applications.
  • 8. K8S Architecture (From Above 5000 ft)
  • 10. Small group of containers and volume Tightly coupled ● The atom of replication and placement Logical host for containers ● Echo pod get an IP address ● Share data: localhost, volume, IPC, etc. K8S POD
  • 11. Storage automatically attached to a Pod ● Local storage ● Cloud block storage ○ AWS EBS, GCE persistent ● Cluster storage ○ NSF, Gluster ○ iSCSI, Cinder ● Special volumes ○ Git repo, secret K8S Volume
  • 12. Ensures N copies of Pod ● If too few, start new one ● If too many, kill some Enables self-healing Facilitates auto scaling K8S Replication Controller
  • 13. Group of pods thats work together DNS name Load balanced: name map to a stable virtual IP Decoupled from Pods and Replication controllers K8S Service
  • 14. Secrets: Tokens, credentials, certs, etc. Don’t put them in a container image. Inject them as virtual volume into pods ● Not backed into images nor pod config ● Kept in memory, never touches disk K8S Secret
  • 15. Multi tenancy in K8S is namespace has its own ● Resources (Pods, Services, etc.) ● Policies (who can or cannot perform an action in their tenancy) ● Constrain (how much quota, etc.) K8S Namespace
  • 16. 12-factor says config comes from the environment. ● Should not be baked into Docker image ConfigMap inject config as a virtual volume into the Pods ● Late binding, live update (atomic) ● Also available as env vars K8S ConfigMap
  • 17. Services are assumed L4 Ingress in L7 Ingress maps HTTP/HTTPS incoming traffic to backend services ● By host headers ● By URL paths K8S Ingress
  • 26. Rolling update too imperative Deployment manage RC changes for you ● Kubectl edit /apply is all you need Aggregate stats Can have multiple updates inflight K8S Deployment
  • 27. How to run pod in every node? Or subset of nodes? Daemonset ● Like ReplicationController ● Do one thing ● Don’t overload Which node is a selector K8S Daemonset
  • 28. Give Pods time to clean up Catch SIGTERM, clean-up exit ASAP Pods status Terminating 30 seconds by default ● Finish inflight operation ● Flush to disk ● Log state K8S Graceful Termination
  • 29. Automatically scale RCs to a target utilization ● CPU utilization for now Operate within user-defined min/max bound Set it and forget it K8S Horizontal Pod Autoscaler
  • 30. Demo: Hello World with kubectl
  • 31. ● Draft ● Gitkube ● Helm ● Ksonnet ● Skaffold ● Metaparticle ● Ballerina Tools and framework for K8S
  • 32. ● Draft ● Gitkube ● Helm ● Ksonnet ● Skaffold ● Metaparticle ● Ballerina Tools and framework for K8S ● deploy code to k8s cluster (automates build-push-deploy) ● deploy code in draft-pack supported languages without writing dockerfile or k8s manifests ● needs draft cli, helm cli, tiller on cluster, local docker, docker registry
  • 33. ● Draft ● Gitkube ● Helm ● Ksonnet ● Skaffold ● Metaparticle ● Ballerina Tools and framework for K8S ● deploy code to k8s cluster (automates build-push-deploy) ● git push to deploy, no dependencies on your local machine ● needs dockerfile, k8s manifests in the git repo, gitkube on cluster
  • 34. ● Draft ● Gitkube ● Helm ● Ksonnet ● Skaffold ● Metaparticle ● Ballerina Tools and framework for K8S ● deploy and manage charts (collection of k8s objects defining an application) on a k8s cluster ● ready made charts for many common applications, like mysql, mediawiki etc. ● needs helm cli, tiller on cluster, chart definition locally or from a repo
  • 35. ● Draft ● Gitkube ● Helm ● Ksonnet ● Skaffold ● Metaparticle ● Ballerina Tools and framework for K8S ● define k8s manifests in jsonnet, deploy them to k8s cluster ● reusable components for common patterns and stacks, like deployment+service, redis ● needs jsonnet knowledge, ksonnet cli
  • 36. ● Draft ● Gitkube ● Helm ● Ksonnet ● Skaffold ● Metaparticle ● Ballerina Tools and framework for K8S ● deploy code to k8s cluster (automates build-push-deploy) ● watches source code and triggers build-push-deploy when change happens, configurable pipeline ● needs skaffold cli, dockerfile, k8s manifests, skaffold manifest in folder, local docker, docker registry
  • 37. ● Draft ● Gitkube ● Helm ● Ksonnet ● Skaffold ● Metaparticle ● Ballerina Tools and framework for K8S ● deploy your code in metaparticle supported languages to k8s (automates build-push-deploy) ● define containerizing and deploying to k8s in the language itself, in an idiomatic way, without writing dockerfile or k8s yaml ● needs metaparticle library for language, local docker
  • 38. ● Draft ● Gitkube ● Helm ● Ksonnet ● Skaffold ● Metaparticle ● Ballerina Tools and framework for K8S ● Generate docker images, k8s artifacts depending on annotation defined in the code. ● Support many Kubernetes functionalities like; all kind of Kubernetes services, deployment, ingress, secrets, persistent volumes, config maps, liveness probe and horizontal pod autoscaling.
  • 41. ● https://kubernetes.io/docs/concepts ● https://www.youtube.com/watch?v=A4A7ybtQujA ● https://www.slideshare.net/DanielSmith272/whats-new-in-k ubernetes ● https://blog.hasura.io/draft-vs-gitkube-vs-helm-vs-ksonnet -vs-metaparticle-vs-skaffold-f5aa9561f948 References