Upload
qaware-gmbh
View
461
Download
2
Embed Size (px)
Citation preview
Spring Cloud Apps with KubernetesM.-Leander Reimer (@LeanderReimer) & Josef Fuchshuber (@fuchshuber)
SPRING CLOUD APPS WITH KUBERNETES
THE ZWITSCHER SHOW CASE
KUBERNETES
HTTPS://GITHUB.COM/QAWARE/CLOUD-NATIVE-ZWITSCHER
SPRING CLOUD APPS WITH KUBERNETES
RUN KUBERNETES ON LOCAL MACHINE OR ON TURN-KEY CLOUD SOLUTIONSexport KUBERNETES_PROVIDER=vagrant
export NUM_NODES=1
curl -sS https://get.k8s.io | bash
export KUBERNETES_PROVIDER=aws
export KUBE_AWS_ZONE=eu-central-1a
export NODE_SIZE=t2.small
curl -sS https://get.k8s.io | bash
export KUBE_GCE_ZONE=europe-west1-d
export NUM_NODES=4
curl -sS https://get.k8s.io | bash
SPRING CLOUD APPS WITH KUBERNETES
INFRASTRUCTURE AS CODE IST DAS DEVOPS-ESPERANTO
SPRING CLOUD APPS WITH KUBERNETES
DOCKERIZE IT
ZWITSCHER-BOARD
ZWITSCHER-CONFIG
ZWITSCHER-EDGE
ZWITSCHER-EUREKA
ZWITSCHER-MONITOR
ZWITSCHER-SERVICE
DEBI
AN8-
JRE8
DEBI
AN:8
POD DeploymentPOD Deployment
POD Deployment
SPRING CLOUD APPS WITH KUBERNETES
KUBERNETIZE IT
ZWITSCHER-BOARD
ZWITSCHER-CONFIG
ZWITSCHER-EDGE
ZWITSCHER-EUREKA
ZWITSCHER-MONITORZWITSCHER-SERVICEPOD Deployment POD Deployment POD Deployment
SERVICE SERVICE SERVICE
SERVICE SERVICE
SERVICE
SPRING CLOUD APPS WITH KUBERNETES
K8S DEPLOYMENT DESCRIPTOR EXAMPLEapiVersion: extensions/v1beta1 kind: Deployment metadata: name: zwitscher-service spec: replicas: 1 template: metadata: labels: zwitscher: service spec: containers: - name: zwitscher-service image: "qaware-oss-docker-registry.bintray.io/zwitscher/zwitscher-service"
resources: requests: memory: "256Mi" cpu: "250m" limits: memory: "512Mi" cpu: "500m" ports:
- containerPort: 8080 livenessProbe: httpGet: path: /admin/health port: 8080 initialDelaySeconds: 90 timeoutSeconds: 5 env: - name: EUREKA_HOST value: zwitscher-eureka
1 Docker Container
Health Checks
Resource Limits
SPRING CLOUD APPS WITH KUBERNETES
K8S SERVICE DESCRIPTOR EXAMPLE
apiVersion: v1 kind: Service metadata: name: zwitscher-service labels: zwitscher: service spec: # if your cluster supports it, uncomment the following to automatically create # an external load-balanced IP for the frontend service. Do not use locally. # type: LoadBalancer # sessionAffinity: ClientIP ports: - port: 8080 selector: zwitscher: service
SPRING CLOUD APPS WITH KUBERNETES
KUBERNETES DEPLOYMENT VISUALIZATION USING A NOVATION LAUNCHPAD
Kubernetes Deployment
Running Pods
Selected Deployment
Up/Down & Scale
Click to Start/Stop
DEMO TIME
SPRING CLOUD APPS WITH KUBERNETES
ALTERNATIVE: ZWITSCHERN WITH NATIVE K8S INFRASTRUCTURE
ZWITSCHER-BOARD
EDGE-SERVER: SERVICES & INGRES
ZWITSCHER-MONITORZWITSCHER-SERVICEPOD Deployment POD Deployment POD Deployment
SERVICE SERVICE SERVICE
CONFIGURATION & COORDINATION: ETCDDISCOVERY: DNS