spring cloud apps with kubernetes

12
Spring Cloud Apps with Kubernetes M.-Leander Reimer (@LeanderReimer) & Josef Fuchshuber (@fuchshuber)

Upload: qaware-gmbh

Post on 21-Jan-2018

461 views

Category:

Data & Analytics


2 download

TRANSCRIPT

Page 1: Spring Cloud Apps with Kubernetes

Spring Cloud Apps with KubernetesM.-Leander Reimer (@LeanderReimer) & Josef Fuchshuber (@fuchshuber)

Page 2: Spring Cloud Apps with Kubernetes

SPRING CLOUD APPS WITH KUBERNETES

THE ZWITSCHER SHOW CASE

KUBERNETES

HTTPS://GITHUB.COM/QAWARE/CLOUD-NATIVE-ZWITSCHER

Page 3: Spring Cloud Apps with Kubernetes

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

Page 4: Spring Cloud Apps with Kubernetes

SPRING CLOUD APPS WITH KUBERNETES

INFRASTRUCTURE AS CODE IST DAS DEVOPS-ESPERANTO

Page 5: Spring Cloud Apps with Kubernetes

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

Page 6: Spring Cloud Apps with Kubernetes

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

Page 7: Spring Cloud Apps with Kubernetes

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

Page 8: Spring Cloud Apps with Kubernetes

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

Page 9: Spring Cloud Apps with Kubernetes

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

Page 10: Spring Cloud Apps with Kubernetes

DEMO TIME

Page 11: Spring Cloud Apps with Kubernetes

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

Page 12: Spring Cloud Apps with Kubernetes

TWITTER.COM/QAWARE - SLIDESHARE.NET/QAWARE