Vishwakarma: Terraform modules for deploying EKS and Self-hosting Kubernetes

5a84ea9a0afaca03be45b87dde58e51c?s=47 Kyle Bai
December 21, 2019

Vishwakarma: Terraform modules for deploying EKS and Self-hosting Kubernetes


Kyle Bai

December 21, 2019


  1. @k2r2bai Vishwakarma: Terraform modules for deploying EKS and Self-hosting Kubernetes

    1 ⽩凱仁(Kyle Bai) <>
  2. @k2r2bai About Me ⽩凱仁(Kyle Bai) • Site Reliability Engineer at

    AMIS • Contributor to multiple OSS. • Certified Kubernetes Administrator/Developer. • Co-organizer of Cloud Native Taiwan User Group. • Interested in emerging technologies. @kairen
  3. @k2r2bai Agenda Today I would like to talk about •

    Infrastructure as code • Vishwakarma • Live Demo
  4. @k2r2bai Infrastructure as code

  5. @k2r2bai "Infrastructure-as-code (IaC) is the concept of writing code to

    represent your infrastructure requirements and using an IaC tool to apply those changes to your cloud/on-prem environment."
  6. @k2r2bai • Create/change/destroy infrastructure resources such as compute, storage, networking

    components or platform services like database, Kubernetes cluster etc. • Deploy/update applications on top of the infrastructure. • Manage the configurations used by the applications. • Versioning infrastructure. The problems IaC tools can solve
  7. @k2r2bai

  8. @k2r2bai

  9. @k2r2bai

  10. @k2r2bai Terraform is the only tool to focus solely on

    creating, destroying and managing infrastructure components. You use the Hashicorp Configuration Language (HCL) to describe the infrastructure resources you need. • Provider • Provisioner • Modules • Plan phase • Apply phase Terraform
  11. @k2r2bai example

  12. @k2r2bai

  13. @k2r2bai CLI or Console Terraform CLI

  14. @k2r2bai

  15. @k2r2bai NGINX

  16. @k2r2bai MyApp

  17. @k2r2bai Vishwakarma

  18. @k2r2bai Solutions on AWS Kubespray RKE Kops Kube-aws Typhoon Kubicorn

    CoreOS Tectonic LinuxKit Matchbox KubeNow Bootkube kubeadm-dind-cluster Minikube PKS Kubeadm KIND KRIB
  19. @k2r2bai Challenges to build Kubrnetes

  20. @k2r2bai Challenges to build Kubrnetes on AWS • Maintain all

    AWS resources(ex: EC2 instance, VPC). • Kubernetes node(worker) scalability. • Kubernetes components upgrade. • Logging and Monitoring. • Configuration management.
  21. @k2r2bai • Network environment customize. • Align company compliance. •

    Audit. • Security. • Cost. • Clusters have difference topology. • Want more specific features. • .... Why build Kubernetes by ourselves?
  22. @k2r2bai Vishwakarma can be used to create a Kubernetes cluster

    in AWS by leveraging HashiCorp Terraform and CoreOS. And there are two kind of Kubernetes master within vishwakarma, one leverages AWS EKS, the other one is ElastiKube (Self-Hosted). Vishwakarma
  23. @k2r2bai ElastiKube is a highly configurable Terraform module with building

    blocks. The motivation to build ElastiKube is that we need: • Robust and HA Kubernetes master nodes. • Pluggable HA worker nodes with different instance types. • Configurable Kubernetes resources during bootstrapping. • Standalone and HA etcd. • Use CoreOS Container Linux on all host machines. • Use Ignition for provisioning Container Linux. What's ElastiKube?
  24. @k2r2bai Ignition is the utility used by CoreOS Container Linux,

    Fedora CoreOS, and RHEL CoreOS to manipulate disks during the initramfs. This includes partitioning disks, formatting partitions, writing files (regular files, systemd units, etc.), and configuring users. Ignition
  25. @k2r2bai

  26. @k2r2bai Make sure that all resources are IMMUTABLE!

  27. @k2r2bai Live demo

  28. @k2r2bai What’s Going On?

  29. @k2r2bai Q &A

  30. @k2r2bai KAIREN OUT!! THANK YOU!!!