CEO / Solution Architect at PDMLab
Microsoft MVP / ASP.NET since 2004
ASP.NET Web API Advisor since 2011
Microsoft Azure Advisor since 2014
Organizer of Azure Meetup Karlsruhe
Using Docker since 2013
https://pdmlab.com
alexander.zeitler@pdmlab.com
@alexzeitler_
Microservices is a variant of the service-oriented architecture (SOA) architectural style that structures an application as a collection of loosely coupled services.
Microservices-based architectures enable continuous delivery and deployment.
In a microservices architecture, services should be fine-grained and the protocols should be lightweight. The benefit of decomposing an application into different smaller services is that it improves modularity and makes the application easier to understand, develop and test.
The benefit of decomposing an application into different smaller services is that it improves modularity and makes the application easier to understand, develop and test. It also parallelizes development by enabling small autonomous teams to develop, deploy and scale their respective services independently
package application in a container image
Move container image to another machine
Execute container(s) based on image
FROM ubuntu:16.04
MAINTAINER Alexander Zeitler <alexander.zeitler@pdmlab.com>
RUN apt-get update
RUN apt-get install -y nginx
RUN echo 'Hi, I am your father...erm in your container' \
>/usr/share/nginx/html/index.html
CMD [ "nginx", "-g", "daemon off;" ]
EXPOSE 80
Image name <username>/<reponame>
e.g. microsoft/dotnet
docker push
docker pull
Engine
Compose
Hub
Machine
Swarm
Registry
Cloud
docker run ubuntu echo hello world
Greek for "Helmsman"
The person who steers a ship
Docker Swarm
Mesos / DC/OS
Kubernetes
HTTPS
KV
Auth
Db
Log
Messaging
LB
Orders
HTTPS
KV
Auth
Db
Log
Messaging
LB
Orders
HTTPS
KV
Auth
Db
Log
Messaging
LB
Orders
Node 1
Node 2
Node 3
{ /*App*/}
Master
Master
Master
Node
Node
Node
Node
Node
Node
Deployment
Pods
Pods
Pods
{ /*App*/}
Master
Master
Master
Node
Node
Node
Node
Node
Node
Master
Node
Linux
Linux
Node
Linux
Node
Linux
Env
Env
Env
Env
Master
Linux
Env
KV
apiserver
kube-apiserver
Front end to control plane
REST-API
JSON (manifest files)
KV Store
persistent
state config of the cluster
Uses etcd
CM
Controller Manager
Node Controller
Endpoints Controller
Namespace Controller
kube-scheduler
watches apiserver
Assigns work to nodes
Master
KV
apiserver
CM
kubectl
apiserver
Commands (JSON)
Node
Node
Node
Node
Linux
Env
Kubelet
kubernetes agent
registers node with cluster
watches apiserver
instantiates pods
reports to master
endpoint at port :10225
/spec
/healthz
/pods
Container Runtime
pull images
start / stop containers
Docker or rkt
kube-proxy
Networking
Assign IP to Pod
All containers in a Pod share IP
LB across Pods in services
K
CR
P
Master
KV
apiserver
CM
kubectl
apiserver
Manifest file (JSON/YAML)
Node
Node
Node
Master
KV
apiserver
CM
kubectl
apiserver
Manifest file (JSON/YAML)
Node
Node
Node
Pod
Pod
Pod
3 x nginx
nginx
nginx
nginx
Desired State:
Master
KV
apiserver
CM
kubectl
apiserver
Manifest file (JSON/YAML)
Node
Node
Node
Pod
Pod
Pod
3 x nginx
nginx
nginx
nginx
Desired State:
Master
KV
apiserver
CM
kubectl
apiserver
Manifest file (JSON/YAML)
Node
Node
Pod
Pod
3 x nginx
nginx
nginx
Pod
Desired State:
Pod
Pod
link
net
trnsprt
IPC
mount
Namespaces
Network stack
...
Pod
Pod
Pod
Pod
Pod
App
AI-Log
Pod
Pod
Pod
Pod
Pod
10.244.2.4
10.244.2.5
10.244.2.6
10.244.2.6
10.244.2.6
Service
10.244.2.10
DNS: db.myapp
Pod
Pod
Pod
Pod
Pod
10.244.2.4
10.244.2.5
10.244.2.6
10.244.2.6
10.244.2.6
Service
10.244.2.10
DNS: db.myapp
p
p
p
p
p
p
db
db
lb
Manifest files (YAML/JSON)
Rolling updates + rollbacks
Multiple concurrent versions
blue-green-deployment
Canary releases