SlideShare a Scribd company logo
Dayta Engineering Seminar
Kubernetes,Dockerand DaytaAI
12July, 2019
Dockerin a nutshell
• Virtualization software for cross-OS deployment
Program code
Entrypoint
(main.py)
TODO In Remote Linux
Instance:
- apt-get all packages
- git pull
- virtualenv or conda
- install requirements
- if program is server:
- Port mapping (http:80,
https/tcp: 443)
- Execute entrypoint
program
No Docker
+ CUDA & GPU Device Mapping
Dockerfile
FROM nvidia/cuda:9.0-runtime
RUN apt-get update  && apt-
get install -y …
RUN pip install -r
requirements.txt
COPY . .
CMD python application.py
With Docker
TODO In Remote Linux
Instance:
- git pull
- docker build
- docker run
Not using Git?
You are fired
Dockerin a nutshell
• Virtualization software for cross-OS deployment
Program code
Entrypoint
(main.py)
Dockerfile
Docker
Container
docker build
Docker Engine
Host OS
docker run
App A App B
New
App
Dockerin Production
/server
codebase
Entrypoint
(worker.py)
Dockerfile
Worker
Container
docker build
Docker Engine
Host OS
docker-compose run Worker
/client
codebase
Dockerfile
Client
Container
Nginx
Container
In Docker Hub
Nginx
client & server
Worker
Inference Codes
in here
Dockerin Production:Problems
TODO In Remote Linux
Instance:
- git pull
- docker build
- docker run
• Requires SSH &Deployment Process (Infeasible)
• No Automation (Continuous Deployment) (Unreliable)
Docker Engine
Host OS
Worker
Nginx
client & server
Worker
CPU Util: 12%
Mem Util: 20%
• Difficult todetermine optimum resource utilization
(Infeasible)
• 1 Instance per service? (Unscalable)
• Manual reaction tousage spikes (Unreliable)
Profit margin
space for cloud
service providers
Dockerin Production:Problems
Cloud Instance
(Failed)
Public IP
Cloud Instance
Public IP
Cloud Instance
Public IP
Big & Expensive
Instance (e.g.
p3.2xlarge)
Big & Expensive
Instance (e.g.
p3.2xlarge)
Big & Expensive
Instance (e.g.
p3.2xlarge)
1. Marginally
Additional Usage
Cloud Instance
Public IP
Big & Expensive
Instance (e.g.
p3.2xlarge)
2. Instance OR
Program Crash
3. Potential
Network Security
Vulnerability
(SSH, DDoS, etc)
4. Not Enough
Cross-Instance
Load Balancing
5. Difficulty in
Patch & Updates
Kubernetesin a nutshell
• Virtualization software for docker container orchestration, Infrastructure as Code(IaC)
Docker Engine
Host OS
Kubelet
Program code
Entrypoint
(main.py)
Dockerfile
Docker
Container
docker build
Container Registry
DockerHub AWS ECR
docker push
kubectl apply (docker pull)
K8s Pod
Docker
Container
Kubernetes:Components
• Virtualization software for docker container orchestration
K8s Pod
Docker
Container
Pod
- SmallestComponentin Kubernetes
- Equivalentto singledocker-composedeployment
Deployment
- Entityof group of Pods
- Defines& Maintainsthe Podconfig and numberof
Pods
K8s Deployment
K8s Pod
K8s Pod
Service
-Mapping,routingandnetworkaccess controllerfor
deploymentsorpods
-Defines&MaintainsthePodport& DNS mappinginside
andoutsidek8scluster
K8s Deployment
K8s Pod
K8s Pod
K8s ServiceExternal
Requests
Internal
Requests
Kubernetes:Components
• Virtualization software for docker container orchestration
ReplicaSet
- Defines& MaintainsthePodconfig and numberof
Pods
- Deploymentmanagesthe ReplicaSetdefinedfor
Deployment
DaemonSet
- ReplicaSetfor processesrequiredtorun when
Instanceboots
StatefulSet
- ReplicaSetfor Podsthat requirestates(Pod-specific
information)
Job
- ReplicaSetfor processesrequiredtorun once until
completionortermination
CronJob
- JobConfigurationfor Jobsrequiredto run
periodically
Kubernetes:Components
• Virtualization software for docker container orchestration
Node
- Groupof Instanceswithidenticalconfiguration
(InstanceType,NodeAffinity, AutoscalingTrigger)
- Identicalto AWS AutoscalingGroup
k8s::node::gpunode
p3.2xlarge p3.2xlarge
Auto-Scaler
(AWS EC2
Autoscaling
Group)
Node Config:
- Type: p3.2xlarge
- maxSize: 5
- minSize: 1
- nodeLabel:
- type:gpu
k8s::node::gpunode
apiVersion: kops/v1alpha2
kind: InstanceGroup
metadata:
labels:
kops.k8s.io/cluster: somecluster.com
name: gpunodes
spec:
hooks:
- execContainer:
image: dcwangmit01/nvidia-device-plugin:0.1.0
image: kope.io/k8s-1.10-debian-stretch-amd64-hvm-ebs-
2018-05-27
machineType: p3.2xlarge
maxSize: 5
minSize: 1
nodeLabels:
kops.k8s.io/instancegroup: gpunodes
type: gpu
role: Node
subnets:
- us-east-1a
- us-east-1b
- us-east-1c
Kubernetes:Components
• Virtualization software for docker container orchestration
Cluster
- Groupof Nodesforming onesystemforKubernetes
- LargestEntity in K8s
k8s::cluster::somecluster.com
Virtual Private Cloud
k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c
k8s::ig::nodes
k8s::ig::gpunodes
k8s::ig::redisnodes
us-east-1a us-east-1b us-east-1c
r5.xlarge
p3.2xlarge
r5.xlarge r5.xlarge
m4.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge
Kubernetesin Production
k8s.io/somecluster.com::deployment::web
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: web-deployment
labels:
app: web
spec:
replicas: 9
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
spec:
containers:
- name: web
image: somerepo.com/web
ports:
- containerPort: 8080
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
volumeMounts:
- mountPath: /etc/nginx/conf.d
readOnly: true
name: web-nginx-conf
volumes:
- name: web-nginx-conf
configMap:
name: web-nginx-conf
items:
- key: nginx.conf
path: nginx.conf
k8s.io/somecluster.com::service::web
apiVersion: v1
kind: Service
metadata:
name: web
spec:
type: LoadBalancer
selector:
app: web
ports:
- name: http
port: 80
targetPort: 80
- name: https
port: 443
targetPort: 80
Kubernetesin Production
Deployment: web
K8s Pod x 9
Service: webweb-
deployment.yaml
web-
service.yaml kubectl
kubectl apply
kubectl
translate
cyclops
cluster
Kubernetesin Production
Deployment::web::Pod
nginx web
808080 8080
Service::web
podId:80
http(80) https(443)
Kubernetesin Production
Deployment: web
K8s Pod
Service: web
k8s::cluster::somecluster.com
Virtual Private Cloud
k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c
k8s::ig::nodes
k8s::ig::gpunodes
k8s::ig::redisnodes
us-east-1a us-east-1b us-east-1c
r5.xlarge
p3.2xlarge
r5.xlarge r5.xlarge
m4.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge
K8s Pod
K8s Pod K8s Pod
K8s Pod K8s Pod
K8s Pod K8s Pod
K8s Pod
Kubernetesin Production
Deployment: web
Pod: 9/9 (Fulfilled)
Service: web
k8s::cluster::somecluster.com
Virtual Private Cloud
k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c
k8s::ig::nodes
k8s::ig::gpunodes (node affinity limit. Only GPU Processes)
k8s::ig::redisnodes (node affinity limit. Only Redis Processes)
us-east-1a us-east-1b us-east-1c
m4.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge
Kubernetesin Production
Deployment: web
Pod: 9/9 (Fulfilled)
Service: web
k8s::cluster::somecluster.com
Virtual Private Cloud
k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c
k8s::ig::nodes
us-east-1a us-east-1b us-east-1c
m4.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge
t4.large
kube-dns
internal IP of pods
(instanceIP/containerIP)
Register serviceIP
mapped to podIPs
Kubernetesin Production
Deployment: web
Service: web
k8s::cluster::somecluster.com
Virtual Private Cloud
k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c
k8s::ig::nodes
us-east-1a us-east-1b us-east-1c
m4.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge
t4.large
kube-dns
VPC External IP
(Public DNS)
Internet Request
Kubernetesin Production
Deployment: web
Pod: 7/9 (unfulfilled)
Service: web
k8s::cluster::somecluster.com
Virtual Private Cloud
k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c
k8s::ig::nodes (instances 4/5 (unfulfilled))
k8s::ig::gpunodes (node affinity limit. Only GPU Processes)
k8s::ig::redisnodes (node affinity limit. Only Redis Processes)
us-east-1a us-east-1b us-east-1c
m4.xlarge m4.xlarge m4.xlarge
(errored)
m4.xlarge m4.xlarge
Kubernetesin Production
Deployment: web
Pod: 9/9 (fulfilled)
Service: web
k8s::cluster::somecluster.com
Virtual Private Cloud
k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c
k8s::ig::nodes (instances 4/5 (unfulfilled))
k8s::ig::gpunodes (node affinity limit. Only GPU Processes)
k8s::ig::redisnodes (node affinity limit. Only Redis Processes)
us-east-1a us-east-1b us-east-1c
m4.xlarge m4.xlarge m4.xlarge
(errored)
m4.xlarge m4.xlargem4.xlarge
(booting)
internal IP of pods
(instanceIP/containerIP)
Kubernetesin Production
Deployment: web
Pod: 9/9 (fulfilled)
Service: web
k8s::cluster::somecluster.com
Virtual Private Cloud
k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c
k8s::ig::nodes
k8s::ig::gpunodes (node affinity limit. Only GPU Processes)
k8s::ig::redisnodes (node affinity limit. Only Redis Processes)
us-east-1a us-east-1b us-east-1c
m4.xlarge m4.xlarge m4.xlarge
(terminate
d)
m4.xlarge m4.xlargem4.xlarge
internal IP of pods
(instanceIP/containerIP)
Kubernetesin Production
Deployment: web
Service:
some-system
k8s::cluster::somecluster.com
Virtual Private Cloud
k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c
k8s::ig::nodes
us-east-1a us-east-1b us-east-1c
m4.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge
web
t4.large
kube-dns
POST: /getAccount HTTP/1.1
Host: some-system
some
system
Cloud Instance
(Failed)
Private IP
Cloud Instance
Private IP
Cloud Instance
Private IP
Big & Expensive
Instance (e.g.
p3.2xlarge)
Big & Expensive
Instance (e.g.
p3.2xlarge)
Big & Expensive
Instance (e.g.
p3.2xlarge)
1. Marginally
Additional Usage
Cloud Instance
Private IP
Big & Expensive
Instance (e.g.
p3.2xlarge)
2. Instance OR
Program Crash
3. Potential
Network Security
Vulnerability
(SSH, DDoS, etc)
4. Not Enough
Cross-Instance
Load Balancing
5. Difficulty in
Patch & Updates
- Direct Access to Instances blocked by
Bastion (SSH Proxy)
- Direct Access to Containers blocked by
kube-dns
- Marginally Additional Usage leads to
auto-scaling of pods, not instances
- K8s automatically maintains the
deployment state of processes and
instances
- Whole purpose of k8s is
cross-instance load
balancing and easy
orchestration of docker
containers
Dockerin Production:Problems Recap
Ad

More Related Content

What's hot (20)

Cilium: Kernel Native Security & DDOS Mitigation for Microservices with BPF
Cilium: Kernel Native Security & DDOS Mitigation for Microservices with BPFCilium: Kernel Native Security & DDOS Mitigation for Microservices with BPF
Cilium: Kernel Native Security & DDOS Mitigation for Microservices with BPF
Docker, Inc.
 
SCALE 2011 Deploying OpenStack with Chef
SCALE 2011 Deploying OpenStack with ChefSCALE 2011 Deploying OpenStack with Chef
SCALE 2011 Deploying OpenStack with Chef
Matt Ray
 
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
CloudOps2005
 
Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2
Hao H. Zhang
 
[20200720]cloud native develoment - Nelson Lin
[20200720]cloud native develoment - Nelson Lin[20200720]cloud native develoment - Nelson Lin
[20200720]cloud native develoment - Nelson Lin
HanLing Shen
 
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Nati Shalom
 
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Docker Meetup - Melbourne 2015 - Kubernetes Deep DiveDocker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Ken Thompson
 
KubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant KubernetesKubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant Kubernetes
KubeAcademy
 
Container Camp London (2016-09-09)
Container Camp London (2016-09-09)Container Camp London (2016-09-09)
Container Camp London (2016-09-09)
craigbox
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeAcademy
 
The 2nd half. Scaling to the next^2
The 2nd half. Scaling to the next^2The 2nd half. Scaling to the next^2
The 2nd half. Scaling to the next^2
Haggai Philip Zagury
 
Build Your Own PaaS, Just like Red Hat's OpenShift from LinuxCon 2013 New Orl...
Build Your Own PaaS, Just like Red Hat's OpenShift from LinuxCon 2013 New Orl...Build Your Own PaaS, Just like Red Hat's OpenShift from LinuxCon 2013 New Orl...
Build Your Own PaaS, Just like Red Hat's OpenShift from LinuxCon 2013 New Orl...
OpenShift Origin
 
Distributed tensorflow on kubernetes
Distributed tensorflow on kubernetesDistributed tensorflow on kubernetes
Distributed tensorflow on kubernetes
inwin stack
 
Apache Spark on K8S and HDFS Security with Ilan Flonenko
Apache Spark on K8S and HDFS Security with Ilan FlonenkoApache Spark on K8S and HDFS Security with Ilan Flonenko
Apache Spark on K8S and HDFS Security with Ilan Flonenko
Databricks
 
OpenStack Magnum 2016-08-04
OpenStack Magnum 2016-08-04OpenStack Magnum 2016-08-04
OpenStack Magnum 2016-08-04
Adrian Otto
 
Docker for Multi-Cloud Apps
Docker for Multi-Cloud AppsDocker for Multi-Cloud Apps
Docker for Multi-Cloud Apps
Adrian Otto
 
LINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native World
LINE Corporation
 
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
VirtualTech Japan Inc.
 
Kubernetes Failure Stories - KubeCon Europe Barcelona
Kubernetes Failure Stories - KubeCon Europe BarcelonaKubernetes Failure Stories - KubeCon Europe Barcelona
Kubernetes Failure Stories - KubeCon Europe Barcelona
Henning Jacobs
 
How to Integrate Kubernetes in OpenStack
 How to Integrate Kubernetes in OpenStack  How to Integrate Kubernetes in OpenStack
How to Integrate Kubernetes in OpenStack
Meng-Ze Lee
 
Cilium: Kernel Native Security & DDOS Mitigation for Microservices with BPF
Cilium: Kernel Native Security & DDOS Mitigation for Microservices with BPFCilium: Kernel Native Security & DDOS Mitigation for Microservices with BPF
Cilium: Kernel Native Security & DDOS Mitigation for Microservices with BPF
Docker, Inc.
 
SCALE 2011 Deploying OpenStack with Chef
SCALE 2011 Deploying OpenStack with ChefSCALE 2011 Deploying OpenStack with Chef
SCALE 2011 Deploying OpenStack with Chef
Matt Ray
 
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
CloudOps2005
 
Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2
Hao H. Zhang
 
[20200720]cloud native develoment - Nelson Lin
[20200720]cloud native develoment - Nelson Lin[20200720]cloud native develoment - Nelson Lin
[20200720]cloud native develoment - Nelson Lin
HanLing Shen
 
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Nati Shalom
 
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Docker Meetup - Melbourne 2015 - Kubernetes Deep DiveDocker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Ken Thompson
 
KubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant KubernetesKubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant Kubernetes
KubeAcademy
 
Container Camp London (2016-09-09)
Container Camp London (2016-09-09)Container Camp London (2016-09-09)
Container Camp London (2016-09-09)
craigbox
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeAcademy
 
The 2nd half. Scaling to the next^2
The 2nd half. Scaling to the next^2The 2nd half. Scaling to the next^2
The 2nd half. Scaling to the next^2
Haggai Philip Zagury
 
Build Your Own PaaS, Just like Red Hat's OpenShift from LinuxCon 2013 New Orl...
Build Your Own PaaS, Just like Red Hat's OpenShift from LinuxCon 2013 New Orl...Build Your Own PaaS, Just like Red Hat's OpenShift from LinuxCon 2013 New Orl...
Build Your Own PaaS, Just like Red Hat's OpenShift from LinuxCon 2013 New Orl...
OpenShift Origin
 
Distributed tensorflow on kubernetes
Distributed tensorflow on kubernetesDistributed tensorflow on kubernetes
Distributed tensorflow on kubernetes
inwin stack
 
Apache Spark on K8S and HDFS Security with Ilan Flonenko
Apache Spark on K8S and HDFS Security with Ilan FlonenkoApache Spark on K8S and HDFS Security with Ilan Flonenko
Apache Spark on K8S and HDFS Security with Ilan Flonenko
Databricks
 
OpenStack Magnum 2016-08-04
OpenStack Magnum 2016-08-04OpenStack Magnum 2016-08-04
OpenStack Magnum 2016-08-04
Adrian Otto
 
Docker for Multi-Cloud Apps
Docker for Multi-Cloud AppsDocker for Multi-Cloud Apps
Docker for Multi-Cloud Apps
Adrian Otto
 
LINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native World
LINE Corporation
 
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
VirtualTech Japan Inc.
 
Kubernetes Failure Stories - KubeCon Europe Barcelona
Kubernetes Failure Stories - KubeCon Europe BarcelonaKubernetes Failure Stories - KubeCon Europe Barcelona
Kubernetes Failure Stories - KubeCon Europe Barcelona
Henning Jacobs
 
How to Integrate Kubernetes in OpenStack
 How to Integrate Kubernetes in OpenStack  How to Integrate Kubernetes in OpenStack
How to Integrate Kubernetes in OpenStack
Meng-Ze Lee
 

Similar to Dayta AI Seminar - Kubernetes, Docker and AI on Cloud (20)

Kubernetes extensibility
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibility
Docker, Inc.
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
Liran Cohen
 
Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...
Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...
Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...
Victor Morales
 
Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...
Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...
Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...
KCD Guadalajara
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
QAware GmbH
 
Kubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and ServicesKubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and Services
Jian-Kai Wang
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
Ben Hall
 
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stack
QAware GmbH
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
Mario-Leander Reimer
 
Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burnt
Amir Moghimi
 
Docker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker eeDocker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker ee
Docker, Inc.
 
Docker Container As A Service - March 2016
Docker Container As A Service - March 2016Docker Container As A Service - March 2016
Docker Container As A Service - March 2016
Patrick Chanezon
 
Containers as a Service with Docker
Containers as a Service with DockerContainers as a Service with Docker
Containers as a Service with Docker
Docker, Inc.
 
Docker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalDocker Enterprise Workshop - Technical
Docker Enterprise Workshop - Technical
Patrick Chanezon
 
Kubernetes deployment on bare metal with container linux
Kubernetes deployment on bare metal with container linuxKubernetes deployment on bare metal with container linux
Kubernetes deployment on bare metal with container linux
macchiang
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
Ben Hall
 
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, KyivKubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Aleksey Asiutin
 
DCEU 18: Docker Container Networking
DCEU 18: Docker Container NetworkingDCEU 18: Docker Container Networking
DCEU 18: Docker Container Networking
Docker, Inc.
 
State of Containers and the Convergence of HPC and BigData
State of Containers and the Convergence of HPC and BigDataState of Containers and the Convergence of HPC and BigData
State of Containers and the Convergence of HPC and BigData
inside-BigData.com
 
Kubernetes extensibility
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibility
Docker, Inc.
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
Liran Cohen
 
Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...
Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...
Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...
Victor Morales
 
Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...
Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...
Migrating GitHub Actions with Nested Virtualization to Cloud Native Ecosystem...
KCD Guadalajara
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
QAware GmbH
 
Kubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and ServicesKubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and Services
Jian-Kai Wang
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
Ben Hall
 
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stack
QAware GmbH
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
Mario-Leander Reimer
 
Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burnt
Amir Moghimi
 
Docker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker eeDocker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker ee
Docker, Inc.
 
Docker Container As A Service - March 2016
Docker Container As A Service - March 2016Docker Container As A Service - March 2016
Docker Container As A Service - March 2016
Patrick Chanezon
 
Containers as a Service with Docker
Containers as a Service with DockerContainers as a Service with Docker
Containers as a Service with Docker
Docker, Inc.
 
Docker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalDocker Enterprise Workshop - Technical
Docker Enterprise Workshop - Technical
Patrick Chanezon
 
Kubernetes deployment on bare metal with container linux
Kubernetes deployment on bare metal with container linuxKubernetes deployment on bare metal with container linux
Kubernetes deployment on bare metal with container linux
macchiang
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
Ben Hall
 
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, KyivKubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Aleksey Asiutin
 
DCEU 18: Docker Container Networking
DCEU 18: Docker Container NetworkingDCEU 18: Docker Container Networking
DCEU 18: Docker Container Networking
Docker, Inc.
 
State of Containers and the Convergence of HPC and BigData
State of Containers and the Convergence of HPC and BigDataState of Containers and the Convergence of HPC and BigData
State of Containers and the Convergence of HPC and BigData
inside-BigData.com
 
Ad

Recently uploaded (20)

The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Ad

Dayta AI Seminar - Kubernetes, Docker and AI on Cloud

  • 2. Dockerin a nutshell • Virtualization software for cross-OS deployment Program code Entrypoint (main.py) TODO In Remote Linux Instance: - apt-get all packages - git pull - virtualenv or conda - install requirements - if program is server: - Port mapping (http:80, https/tcp: 443) - Execute entrypoint program No Docker + CUDA & GPU Device Mapping Dockerfile FROM nvidia/cuda:9.0-runtime RUN apt-get update && apt- get install -y … RUN pip install -r requirements.txt COPY . . CMD python application.py With Docker TODO In Remote Linux Instance: - git pull - docker build - docker run Not using Git? You are fired
  • 3. Dockerin a nutshell • Virtualization software for cross-OS deployment Program code Entrypoint (main.py) Dockerfile Docker Container docker build Docker Engine Host OS docker run App A App B New App
  • 4. Dockerin Production /server codebase Entrypoint (worker.py) Dockerfile Worker Container docker build Docker Engine Host OS docker-compose run Worker /client codebase Dockerfile Client Container Nginx Container In Docker Hub Nginx client & server Worker Inference Codes in here
  • 5. Dockerin Production:Problems TODO In Remote Linux Instance: - git pull - docker build - docker run • Requires SSH &Deployment Process (Infeasible) • No Automation (Continuous Deployment) (Unreliable) Docker Engine Host OS Worker Nginx client & server Worker CPU Util: 12% Mem Util: 20% • Difficult todetermine optimum resource utilization (Infeasible) • 1 Instance per service? (Unscalable) • Manual reaction tousage spikes (Unreliable) Profit margin space for cloud service providers
  • 6. Dockerin Production:Problems Cloud Instance (Failed) Public IP Cloud Instance Public IP Cloud Instance Public IP Big & Expensive Instance (e.g. p3.2xlarge) Big & Expensive Instance (e.g. p3.2xlarge) Big & Expensive Instance (e.g. p3.2xlarge) 1. Marginally Additional Usage Cloud Instance Public IP Big & Expensive Instance (e.g. p3.2xlarge) 2. Instance OR Program Crash 3. Potential Network Security Vulnerability (SSH, DDoS, etc) 4. Not Enough Cross-Instance Load Balancing 5. Difficulty in Patch & Updates
  • 7. Kubernetesin a nutshell • Virtualization software for docker container orchestration, Infrastructure as Code(IaC) Docker Engine Host OS Kubelet Program code Entrypoint (main.py) Dockerfile Docker Container docker build Container Registry DockerHub AWS ECR docker push kubectl apply (docker pull) K8s Pod Docker Container
  • 8. Kubernetes:Components • Virtualization software for docker container orchestration K8s Pod Docker Container Pod - SmallestComponentin Kubernetes - Equivalentto singledocker-composedeployment Deployment - Entityof group of Pods - Defines& Maintainsthe Podconfig and numberof Pods K8s Deployment K8s Pod K8s Pod Service -Mapping,routingandnetworkaccess controllerfor deploymentsorpods -Defines&MaintainsthePodport& DNS mappinginside andoutsidek8scluster K8s Deployment K8s Pod K8s Pod K8s ServiceExternal Requests Internal Requests
  • 9. Kubernetes:Components • Virtualization software for docker container orchestration ReplicaSet - Defines& MaintainsthePodconfig and numberof Pods - Deploymentmanagesthe ReplicaSetdefinedfor Deployment DaemonSet - ReplicaSetfor processesrequiredtorun when Instanceboots StatefulSet - ReplicaSetfor Podsthat requirestates(Pod-specific information) Job - ReplicaSetfor processesrequiredtorun once until completionortermination CronJob - JobConfigurationfor Jobsrequiredto run periodically
  • 10. Kubernetes:Components • Virtualization software for docker container orchestration Node - Groupof Instanceswithidenticalconfiguration (InstanceType,NodeAffinity, AutoscalingTrigger) - Identicalto AWS AutoscalingGroup k8s::node::gpunode p3.2xlarge p3.2xlarge Auto-Scaler (AWS EC2 Autoscaling Group) Node Config: - Type: p3.2xlarge - maxSize: 5 - minSize: 1 - nodeLabel: - type:gpu k8s::node::gpunode apiVersion: kops/v1alpha2 kind: InstanceGroup metadata: labels: kops.k8s.io/cluster: somecluster.com name: gpunodes spec: hooks: - execContainer: image: dcwangmit01/nvidia-device-plugin:0.1.0 image: kope.io/k8s-1.10-debian-stretch-amd64-hvm-ebs- 2018-05-27 machineType: p3.2xlarge maxSize: 5 minSize: 1 nodeLabels: kops.k8s.io/instancegroup: gpunodes type: gpu role: Node subnets: - us-east-1a - us-east-1b - us-east-1c
  • 11. Kubernetes:Components • Virtualization software for docker container orchestration Cluster - Groupof Nodesforming onesystemforKubernetes - LargestEntity in K8s k8s::cluster::somecluster.com Virtual Private Cloud k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c k8s::ig::nodes k8s::ig::gpunodes k8s::ig::redisnodes us-east-1a us-east-1b us-east-1c r5.xlarge p3.2xlarge r5.xlarge r5.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge
  • 12. Kubernetesin Production k8s.io/somecluster.com::deployment::web apiVersion: extensions/v1beta1 kind: Deployment metadata: name: web-deployment labels: app: web spec: replicas: 9 selector: matchLabels: app: web template: metadata: labels: app: web spec: containers: - name: web image: somerepo.com/web ports: - containerPort: 8080 - name: nginx image: nginx imagePullPolicy: IfNotPresent ports: - containerPort: 80 volumeMounts: - mountPath: /etc/nginx/conf.d readOnly: true name: web-nginx-conf volumes: - name: web-nginx-conf configMap: name: web-nginx-conf items: - key: nginx.conf path: nginx.conf k8s.io/somecluster.com::service::web apiVersion: v1 kind: Service metadata: name: web spec: type: LoadBalancer selector: app: web ports: - name: http port: 80 targetPort: 80 - name: https port: 443 targetPort: 80
  • 13. Kubernetesin Production Deployment: web K8s Pod x 9 Service: webweb- deployment.yaml web- service.yaml kubectl kubectl apply kubectl translate cyclops cluster
  • 14. Kubernetesin Production Deployment::web::Pod nginx web 808080 8080 Service::web podId:80 http(80) https(443)
  • 15. Kubernetesin Production Deployment: web K8s Pod Service: web k8s::cluster::somecluster.com Virtual Private Cloud k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c k8s::ig::nodes k8s::ig::gpunodes k8s::ig::redisnodes us-east-1a us-east-1b us-east-1c r5.xlarge p3.2xlarge r5.xlarge r5.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge K8s Pod K8s Pod K8s Pod K8s Pod K8s Pod K8s Pod K8s Pod K8s Pod
  • 16. Kubernetesin Production Deployment: web Pod: 9/9 (Fulfilled) Service: web k8s::cluster::somecluster.com Virtual Private Cloud k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c k8s::ig::nodes k8s::ig::gpunodes (node affinity limit. Only GPU Processes) k8s::ig::redisnodes (node affinity limit. Only Redis Processes) us-east-1a us-east-1b us-east-1c m4.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge
  • 17. Kubernetesin Production Deployment: web Pod: 9/9 (Fulfilled) Service: web k8s::cluster::somecluster.com Virtual Private Cloud k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c k8s::ig::nodes us-east-1a us-east-1b us-east-1c m4.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge t4.large kube-dns internal IP of pods (instanceIP/containerIP) Register serviceIP mapped to podIPs
  • 18. Kubernetesin Production Deployment: web Service: web k8s::cluster::somecluster.com Virtual Private Cloud k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c k8s::ig::nodes us-east-1a us-east-1b us-east-1c m4.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge t4.large kube-dns VPC External IP (Public DNS) Internet Request
  • 19. Kubernetesin Production Deployment: web Pod: 7/9 (unfulfilled) Service: web k8s::cluster::somecluster.com Virtual Private Cloud k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c k8s::ig::nodes (instances 4/5 (unfulfilled)) k8s::ig::gpunodes (node affinity limit. Only GPU Processes) k8s::ig::redisnodes (node affinity limit. Only Redis Processes) us-east-1a us-east-1b us-east-1c m4.xlarge m4.xlarge m4.xlarge (errored) m4.xlarge m4.xlarge
  • 20. Kubernetesin Production Deployment: web Pod: 9/9 (fulfilled) Service: web k8s::cluster::somecluster.com Virtual Private Cloud k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c k8s::ig::nodes (instances 4/5 (unfulfilled)) k8s::ig::gpunodes (node affinity limit. Only GPU Processes) k8s::ig::redisnodes (node affinity limit. Only Redis Processes) us-east-1a us-east-1b us-east-1c m4.xlarge m4.xlarge m4.xlarge (errored) m4.xlarge m4.xlargem4.xlarge (booting) internal IP of pods (instanceIP/containerIP)
  • 21. Kubernetesin Production Deployment: web Pod: 9/9 (fulfilled) Service: web k8s::cluster::somecluster.com Virtual Private Cloud k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c k8s::ig::nodes k8s::ig::gpunodes (node affinity limit. Only GPU Processes) k8s::ig::redisnodes (node affinity limit. Only Redis Processes) us-east-1a us-east-1b us-east-1c m4.xlarge m4.xlarge m4.xlarge (terminate d) m4.xlarge m4.xlargem4.xlarge internal IP of pods (instanceIP/containerIP)
  • 22. Kubernetesin Production Deployment: web Service: some-system k8s::cluster::somecluster.com Virtual Private Cloud k8s::ig::master-us-east-1a k8s::ig::master-us-east-1b k8s::ig::master-us-east-1c k8s::ig::nodes us-east-1a us-east-1b us-east-1c m4.xlarge m4.xlarge m4.xlarge m4.xlarge m4.xlarge web t4.large kube-dns POST: /getAccount HTTP/1.1 Host: some-system some system
  • 23. Cloud Instance (Failed) Private IP Cloud Instance Private IP Cloud Instance Private IP Big & Expensive Instance (e.g. p3.2xlarge) Big & Expensive Instance (e.g. p3.2xlarge) Big & Expensive Instance (e.g. p3.2xlarge) 1. Marginally Additional Usage Cloud Instance Private IP Big & Expensive Instance (e.g. p3.2xlarge) 2. Instance OR Program Crash 3. Potential Network Security Vulnerability (SSH, DDoS, etc) 4. Not Enough Cross-Instance Load Balancing 5. Difficulty in Patch & Updates - Direct Access to Instances blocked by Bastion (SSH Proxy) - Direct Access to Containers blocked by kube-dns - Marginally Additional Usage leads to auto-scaling of pods, not instances - K8s automatically maintains the deployment state of processes and instances - Whole purpose of k8s is cross-instance load balancing and easy orchestration of docker containers Dockerin Production:Problems Recap