Ignite + Cluster API Helsinki August Meetup

Ignite + Cluster API Helsinki August Meetup


Lucas Käldström

August 27, 2019


  1. 1 Weave Ignite, Kubernetes Cluster API, and all the things!

    Lucas Käldström - CNCF Ambassador 27th of August, 2019 - Helsinki Image credit: @ashleymcnamara
  2. 2 $ whoami Lucas Käldström, soon-to-be University Student, 19 yo

    CNCF Ambassador, Certified Kubernetes Administrator and (former) Kubernetes WG/SIG Lead KubeCon Speaker in Berlin, Austin, Copenhagen, Shanghai & Seattle KubeCon Keynote Speaker in Barcelona Kubernetes approver and subproject owner, active in the community for 3+ years. Got kubeadm to GA. Weave Ignite creator Driving luxas labs which currently performs contracting for Weaveworks
  3. Agenda

  4. 4 Agenda - SIG Cluster Lifecycle vision & building blocks

    - minikube - kubeadm - Cluster API - Weave Ignite - Demo - Architecture - Motivation
  5. History and Context

  6. 6 Nodes Control Plane Kubernetes’ high-level component architecture Node 3

    OS Container Runtime Kubelet Networking Node 2 OS Container Runtime Kubelet Networking Node 1 OS Container Runtime Kubelet Networking API Server (REST API) Controller Manager (Controller Loops) Scheduler (Bind Pod to Node) etcd (key-value DB, SSOT) User Legend: CNI CRI OCI Protobuf gRPC JSON
  7. 7 minikube & kubeadm Wanted to simplify the deployment experience

    Helped create SIG Cluster Lifecycle => co-lead until now Shepherding kubeadm
  8. 8 kubeadm = A tool that sets up a minimum

    viable, best-practice Kubernetes cluster Master 1 Master N Node 1 Node N kubeadm kubeadm kubeadm kubeadm Cloud Provider Load Balancers Monitoring Logging Cluster API Spec Cluster API Cluster API Implementation Addons Kubernetes API Bootstrapping Machines Infrastructure Layer 2 The scope of kubeadm Layer 3 Layer 1
  9. 9 kubeadm vs kops or kubespray Two different projects, two

    different scopes Master 1 Master N Node 1 Node N kubeadm kubeadm kubeadm kubeadm Cloud Provider Load Balancers Monitoring Logging Cluster API Spec Cluster API Cluster API Implementation Addons Kubernetes API Bootstrapping Machines Infrastructure kops
  10. 10 Cluster API The next step after kubeadm “To make

    the management of (X) clusters across (Y) providers simple, secure, and configurable.” “How can I manage any number of clusters in a similar fashion to how I manage deployments in Kubernetes?”
  11. 11 Cluster API The next step after kubeadm “How do

    I manage other lifecycle events across that infrastructure (upgrades, deletions, etc.)?” “How can we control all of this via a consistent API across providers?”
  12. 12 Weave Ignite “An open source Virtual Machine (VM) manager

    with a container UX and built-in GitOps management” - Firecracker MicroVMs & OCI containers to unify containers and VMs. - Works in a GitOps fashion; manages VMs declaratively
  13. Enter the fire

  14. 14 Why? Originates from my Finnish conscription time; where I

    worked on programming tasks We needed to: a) Use open source (no “normal” VM licenses) b) Run legacy applications with “special requirements” c) Integrate with containers
  15. 15 How? BUT: Firecracker is HARD to use (for those

    who happen to not be KVM devs)
  16. 16

  17. 17

  18. 18 Weave Ignite What does it do? Why do you

    want it? Declarative Infra Next level VM speed
  19. 19 # Let's run the weaveworks/ignite-ubuntu docker image as a

    VM # Use 2 vCPUs and 1GB of RAM, enable automatic SSH access and name it my-vm ignite run weaveworks/ignite-ubuntu \ --cpus 2 \ --memory 1GB \ --ssh \ --name my-vm # List running VMs ignite ps # List Docker (OCI) and kernel images imported into Ignite ignite images ignite kernels # Get the boot logs of the VM ignite logs my-vm # SSH into the VM ignite ssh my-vm Demo!
  20. 20 Ways to use Ignite - Docker-like UX - GitOps

    - (Future) Virtual Kubelet
  21. 21 Design & Architecture Use OCI for: a) content distribution

    b) monitoring processes c) process isolation Device Mapper & DHCP bridges containers + VMs
  22. 22 Building VM images (the new way)

  23. 23 GitOps all the things! a) Store desired state in

    Git b) Run an app reconciling desired => actual state c) App writes status back to Git d) Can observe diffs between observed and desired state
  24. 24 => gitops-toolkit Prototype to make any app Git-backed Generic

    framework built upon k8s.io/apimachinery Common code broken out from Ignite
  25. 25 Run Kubernetes on top of Ignite VMs - kind

    - kubeadm / k3s guide - Footloose (docker-compose) - Cluster API providers - => Firekube?
  26. 26 “GitOps” for your cluster(s) apiVersion: cluster.k8s.io/v1alpha1 kind: MachineDeployment metadata:

    name: my-nodes spec: replicas: 3 selector: matchLabels: foo: bar template: metadata: labels: foo: bar spec: providerConfig: value: apiVersion: "baremetalconfig/v1alpha1" kind: "BareMetalProviderConfig" zone: "us-central1-f" machineType: "n1-standard-1" image: "ubuntu-1604-lts" versions: kubelet: 1.14.2 containerRuntime: name: containerd version: 1.2.0 • With Kubernetes we manage our applications declaratively a. Why not for the cluster itself? • With the Cluster API, we can declaratively define the desired cluster state a. Operator implementations reconcile the state b. Use Spec & Status like the rest of k8s c. Common management solutions for e.g. upgrades, autoscaling and repair d. Allows for “GitOps” workflows
  27. 27 Read the Docs

  28. Recap

  29. 29 Weave Ignite Firecracker SIG Cluster Lifecycle kubeadm Cluster API

    Raspberry Pi Questions?
  30. Thank you! @luxas on Github @luxas on Kubernetes’ Slack @kubernetesonarm

    on Twitter lucas@luxaslabs.com