Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
MAKE

MONEY

MATTER.
Kubernetes Operations
By Kasper Nissen (@phennex), DevOps Engineer @thelunarway
MAKE

MONEY

MATTER.
Kubernetes Operations
By Kasper Nissen (@phennex), DevOps Engineer @thelunarway
Vision
We're living in the era of mobile/digital only – we believe
banking and commerce should to.
Therefore, our vision i...
Product “
We own
the data.
Kasper Nissen
DevOps & Infrastructure Engineer @thelunarway
Experience
DevOps & Infrastructure Engineer @ LEGO (CITMABIS) ...
WHAT IS
KUBERNETES?
Written by: Matt Butcher Illustrated by: Bailey Beougher
WHAT DOES IT DO?
Node Node Node Node Node
Node Node Node Node Node
big dataapp Bapp A database
datacenter
Cluster Manager
WHY ARE WE USING IT AT LUNAR WAY?
Freedom
Squads can deploy and more or less implement
how they see fit
Autonomous services...
THAT’S GREAT,

BUT HOW DO I GET
STARTED? 🤓
KUBERNETES
OPERATIONS
AKA.
KOPS
WHAT IS THAT? 😱
THINK OF IT AS
KUBECTL FOR
CLUSTERS 👏
kubectl get pods
NAME READY STATUS RESTARTS AGE
dns-controller 1/1 Running 0 13d
etcd-server-events-ip 1/1 Running 0 13d
etcd-server-ip 1/1...
kops get cluster
$ kops get cluster
NAME CLOUD ZONES
private-k8s-cluster aws eu-west-1a,eu-west-1b,eu-west-1c
WHAT CAN I DO
WITH IT?
kops helps you create,
destroy, upgrade and
maintain production-grade,
highly available, Kubernetes
clusters from the comm...
WHERE?
AWS (Officially supported)
GCP (alpha)
VMWARE vSPHERE (alpha)
FEATURES?
•Automates the provisioning of Kubernetes clusters in
(AWS)
•Deploys Highly Available (HA) Kubernetes Masters
•Supports up...
LET’S BUILD SOME
CLUSTERS
PREREQUISUITES.
IAM USER
AmazonEC2FullAccess
AmazonRoute53FullAccess
AmazonS3FullAccess
IAMFullAccess
AmazonVPCFullAccess
ROUTE53 HOSTED ZONE
SETUP
Follow the guide:
https://github.com/kubernetes/kops/blob/
master/docs/aws.md
https://github.com/kaspernissen/kops-demo
Videos: http://bit.ly/2tmWOCF
DEMO 1:
SINGLE MASTER IN PUBLIC
ZONE
3 NODES
s3://phennex-state-store
VPC
api.public-single-master.phennex.com
kubectlkops
autoscaling group autoscaling group
eu-west-...
$ kops create cluster 
--name $KOPS_NAME 
--state $KOPS_STATE_STORE 
--dns-zone $PUBLIC_HOSTED_ZONE_ID 
--node-count 3 
--...
DEMO 2:
MULTIPLE MASTERS IN
PRIVATE ZONES
3 NODES
s3://phennex-state-store
VPC
api.private-multiple-masters.phennex.com
kubectl
kops
autoscaling group
autoscaling group aut...
$ kops create cluster 
--name $KOPS_NAME 
--state $KOPS_STATE_STORE 
--node-count 3 
--dns-zone $PRIVATE_HOSTED_ZONE_ID 
-...
AWESOME!
THAT WAS EASY… 👍
WHAT IF YOU WANT YOUR
CLUSTER TO RUN IN AN
EXISTING VPC?
http://kubecloud.io/setup-
ha-k8s-kops/
MANY MORE
CONFIGURATION OPTIONS
TO CHOOSE FROM…
--cloud-labels ”Team=Dev”
--image some-image (Ubuntu, CentOS, RHEL7, CoreOS)
--networking calico, flannel
--node-security-...
WHAT ABOUT UPGRADING?
$ kops upgrade cluster
YOU CAN ALWAYS EDIT YOUR
CLUSTER CONFIGURATION
$ kops edit cluster
$ kops edit ig --name=<CLUSTER> nodes
ROLLING UPDATES

(default pretty bad!) Use feature flag:


$ export KOPS_FEATURE_FLAGS="+DrainAndValidateRollingUpdate"
$ k...
SCALING THE CLUSTER
$ kops edit ig --name $KOPS_NAME nodes
EXTRA…

(if we have time)
CLEAN UP!
OTHER SOLUTIONS
COREOS TECHTONIC
OPENSHIFT
KISMATIC
KUBERMATIC
Thank you!
Catch me on Twitter @phennex
Or in the Slack Community: Cloud Native DK (https://cloudnative-dk.herokuapp.com/ )
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
Upcoming SlideShare
Loading in …5
×

Kubernetes Kops - Automation Night

573 views

Published on

Presentation given at Automation Night in Aarhus June 20th 2017.

Published in: Technology
  • Just got my check for $500, Sometimes people don't believe me when I tell them about how much you can make taking paid surveys online... So I took a video of myself actually getting paid $500 for paid surveys to finally set the record straight. I'm not going to leave this video up for long, so check it out now before I take it down! ▲▲▲ https://tinyurl.com/realmoneystreams2019
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Have you ever heard of taking paid surveys on the internet before? We have one right now that pays $50, and takes less than 10 minutes! If you want to take it, here is your personal link ➤➤ https://tinyurl.com/realmoneystreams2019
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Kubernetes Kops - Automation Night

  1. 1. MAKE
 MONEY
 MATTER. Kubernetes Operations By Kasper Nissen (@phennex), DevOps Engineer @thelunarway
  2. 2. MAKE
 MONEY
 MATTER. Kubernetes Operations By Kasper Nissen (@phennex), DevOps Engineer @thelunarway
  3. 3. Vision We're living in the era of mobile/digital only – we believe banking and commerce should to. Therefore, our vision is to rethink the interaction with money and defining a complete new category - by introducing a new money app. It’s the complex coordination between banking services and commerce use: – How I save money. – How I get money. – How I spend money.
  4. 4. Product “ We own the data.
  5. 5. Kasper Nissen DevOps & Infrastructure Engineer @thelunarway Experience DevOps & Infrastructure Engineer @ LEGO (CITMABIS) (oursourced by IT Minds) for 5 months Senior/Software Engineer @ IT Minds (~4 years part time) Master thesis: KubeCloud - A Small-Scale Tangible Cloud Computing Environment.
 Interview with Software Engineering Daily: bit.ly/2paZ5lg Blogging about Cloud Native Tech @ www.kubecloud.io M. Eng. Computer Technology from Aarhus University - Department of Engineering. B. Eng. Information and Communication Technology from Aarhus University - School of Engineering
  6. 6. WHAT IS KUBERNETES?
  7. 7. Written by: Matt Butcher Illustrated by: Bailey Beougher
  8. 8. WHAT DOES IT DO? Node Node Node Node Node Node Node Node Node Node big dataapp Bapp A database datacenter Cluster Manager
  9. 9. WHY ARE WE USING IT AT LUNAR WAY? Freedom Squads can deploy and more or less implement how they see fit Autonomous services Squads can work independent of other squads Continuous Delivery Kubernetes allows us to deploy multiple times a day. It’s easy to rollback in case something went wrong Flexibility We run many different type of workloads in the cluster. Gives us mobility to become cloud agnostic Scalable infrastructure Scaling the infrastructure is easy, both on node and container level High availability Kubernetes takes care of container failures, AWS Auto Scaling groups takes care of node failures Easy maintenance We are using Kubernetes Operations to help us spin up our clusters, and maintain them. 👍🎉
  10. 10. THAT’S GREAT,
 BUT HOW DO I GET STARTED? 🤓
  11. 11. KUBERNETES OPERATIONS AKA. KOPS
  12. 12. WHAT IS THAT? 😱
  13. 13. THINK OF IT AS KUBECTL FOR CLUSTERS 👏
  14. 14. kubectl get pods
  15. 15. NAME READY STATUS RESTARTS AGE dns-controller 1/1 Running 0 13d etcd-server-events-ip 1/1 Running 0 13d etcd-server-ip 1/1 Running 0 13d kube-apiserver-ip 1/1 Running 0 13d kube-controller-manager 1/1 Running 0 13d
  16. 16. kops get cluster
  17. 17. $ kops get cluster NAME CLOUD ZONES private-k8s-cluster aws eu-west-1a,eu-west-1b,eu-west-1c
  18. 18. WHAT CAN I DO WITH IT?
  19. 19. kops helps you create, destroy, upgrade and maintain production-grade, highly available, Kubernetes clusters from the command line
  20. 20. WHERE?
  21. 21. AWS (Officially supported) GCP (alpha) VMWARE vSPHERE (alpha)
  22. 22. FEATURES?
  23. 23. •Automates the provisioning of Kubernetes clusters in (AWS) •Deploys Highly Available (HA) Kubernetes Masters •Supports upgrading from kube-up •Built on a state-sync model for dry-runs and automatic idempotenc •Ability to generate configuration files for AWS CloudFormation and Terraform configuration •Supports custom Kubernetes add-ons •Command line autocompletion •Community supported!
  24. 24. LET’S BUILD SOME CLUSTERS
  25. 25. PREREQUISUITES.
  26. 26. IAM USER AmazonEC2FullAccess AmazonRoute53FullAccess AmazonS3FullAccess IAMFullAccess AmazonVPCFullAccess
  27. 27. ROUTE53 HOSTED ZONE SETUP Follow the guide: https://github.com/kubernetes/kops/blob/ master/docs/aws.md
  28. 28. https://github.com/kaspernissen/kops-demo Videos: http://bit.ly/2tmWOCF
  29. 29. DEMO 1: SINGLE MASTER IN PUBLIC ZONE 3 NODES
  30. 30. s3://phennex-state-store VPC api.public-single-master.phennex.com kubectlkops autoscaling group autoscaling group eu-west-1a public
  31. 31. $ kops create cluster --name $KOPS_NAME --state $KOPS_STATE_STORE --dns-zone $PUBLIC_HOSTED_ZONE_ID --node-count 3 --zones eu-west-1a --master-zones eu-west-1a --cloud aws --node-size t2.medium --master-size t2.medium --yes
  32. 32. DEMO 2: MULTIPLE MASTERS IN PRIVATE ZONES 3 NODES
  33. 33. s3://phennex-state-store VPC api.private-multiple-masters.phennex.com kubectl kops autoscaling group autoscaling group autoscaling group autoscaling group bastion.private-multiple-masters.phennex.com eu-west-1a eu-west-1b eu-west-1c privatepublic
  34. 34. $ kops create cluster --name $KOPS_NAME --state $KOPS_STATE_STORE --node-count 3 --dns-zone $PRIVATE_HOSTED_ZONE_ID --zones eu-west-1a,eu-west-1b,eu-west-1c --master-zones eu-west-1a,eu-west-1b,eu-west-1c --cloud aws --node-size t2.medium --master-size t2.medium --bastion --topology private --networking weave --yes
  35. 35. AWESOME! THAT WAS EASY… 👍
  36. 36. WHAT IF YOU WANT YOUR CLUSTER TO RUN IN AN EXISTING VPC?
  37. 37. http://kubecloud.io/setup- ha-k8s-kops/
  38. 38. MANY MORE CONFIGURATION OPTIONS TO CHOOSE FROM…
  39. 39. --cloud-labels ”Team=Dev” --image some-image (Ubuntu, CentOS, RHEL7, CoreOS) --networking calico, flannel --node-security-groups --master-security-groups --admin-access <SOME IP> --ssh-public-key=/Users/.. --out=. --target=terraform
  40. 40. WHAT ABOUT UPGRADING?
  41. 41. $ kops upgrade cluster
  42. 42. YOU CAN ALWAYS EDIT YOUR CLUSTER CONFIGURATION $ kops edit cluster $ kops edit ig --name=<CLUSTER> nodes
  43. 43. ROLLING UPDATES
 (default pretty bad!) Use feature flag:
 
$ export KOPS_FEATURE_FLAGS="+DrainAndValidateRollingUpdate" $ kops rolling-update cluster
  44. 44. SCALING THE CLUSTER $ kops edit ig --name $KOPS_NAME nodes
  45. 45. EXTRA…
 (if we have time)
  46. 46. CLEAN UP!
  47. 47. OTHER SOLUTIONS
  48. 48. COREOS TECHTONIC OPENSHIFT KISMATIC KUBERMATIC
  49. 49. Thank you! Catch me on Twitter @phennex Or in the Slack Community: Cloud Native DK (https://cloudnative-dk.herokuapp.com/ )

×