Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ignite + Cluster API Aarhus Meetup

Ignite + Cluster API Aarhus Meetup

Lucas Käldström

August 21, 2019
Tweet

More Decks by Lucas Käldström

Other Decks in Technology

Transcript

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

    Lucas Käldström - CNCF Ambassador 21st of August, 2019 - Aarhus 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. 6 KubeCloud Got in touch with Kasper Nissen and Martin

    Jensen, writing their Master’s Thesis. They used kubernetes-on-arm :)
  4. 7 minikube & kubeadm Wanted to simplify the deployment experience

    Helped create SIG Cluster Lifecycle => co-lead until now Shepherding kubeadm
  5. 8 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?”
  6. 9 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
  7. 11 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
  8. 13

  9. 14

  10. 15 Weave Ignite What does it do? Why do you

    want it? Declarative Infra Next level VM speed
  11. 16 # 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!
  12. 18 Design & Architecture Use OCI for: a) content distribution

    b) monitoring processes c) process isolation Device Mapper & DHCP bridges containers + VMs
  13. 20 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
  14. 21 Run Kubernetes on top of Ignite VMs - kind

    - kubeadm / k3s guide - Footloose (docker-compose) - Cluster API providers - => Firekube?
  15. 22 => gitops-toolkit Prototype to make any app Git-backed Generic

    framework built upon k8s.io/apimachinery Common code broken out from Ignite
  16. 24 Raspberry Pis! Challenge: Get Firecracker to run on a

    Raspberry Pi 4. Tried RPi 3 without success b/c lack of a GIC. Ignite/Firecracker has arm64 binaries, but need GICv2 support
  17. 26 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
  18. 27 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
  19. 28 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
  20. 29 • The What and the Why of Cluster API

    ◦ “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?” ◦ “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?” Cluster API
  21. 30 “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
  22. 31 Cluster API cluster-addons kubeadm etcdadm Component Config k8s cluster

    Provisioners We need your help! There is still a lot of work to do in onder to get the full puzzle in place! The SIG Cluster Lifecycle Roadmap