Weitere ähnliche Inhalte
Ähnlich wie Vishwakarma: Terraform modules for deploying EKS and Self-hosting Kubernetes
Ähnlich wie Vishwakarma: Terraform modules for deploying EKS and Self-hosting Kubernetes (20)
Mehr von Amazon Web Services
Mehr von Amazon Web Services (20)
Vishwakarma: Terraform modules for deploying EKS and Self-hosting Kubernetes
- 2. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. @k2r2bai
Vishwakarma:Terraform modulesfor deploying
EKS andSelf-hosting Kubernetes
Kyle Bai
Site Reliability Engineer
AMIS
Cloud Native Taiwan User Group
- 3. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. @k2r2bai
About Me
⽩凱仁(Kyle Bai)
• SRE at AMIS.
• OSS Contributor.
• Certified Kubernetes Administrator/Developer.
• Co-organizer of Cloud Native Taiwan User Group.
• Interested in emerging technologies.
GitHub: kairen(k2r2.bai@gmail.com)
Blog: https://k2r2bai.com
- 4. @k2r2bai© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Infrastructure as code
• Vishwakarma
• Live Demo
Agenda
Today I would like to talk about
- 6. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“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.”
- 7. @k2r2bai© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• 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
- 11. @k2r2bai© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
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
- 14. @k2r2bai© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
CLI / SDK / Console
Region A Region B Region C ...
Terraform CLI
Region A Region B Region C ...
- 18. @k2r2bai© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kubernetes solutions onAWS
Kubespray
RKE
Kops
Kube-aws
Typhoon
EKS
CoreOS Tectonic
LinuxKit
Matchbox
KubeNow
Bootkube
kubeadm-dind-cluster
Minikube
PKS
Kubeadm
KIND
KRIB
- 19. @k2r2bai© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Challenges to build Kubrnetes
- 20. @k2r2bai© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Maintain all AWS resources(ex: EC2 instance, VPC).
• Kubernetes node(worker) scalability.
• Kubernetes components upgrade.
• Logging and Monitoring.
• Configuration management.
Challenges to build Kubrnetes onAWS
- 21. @k2r2bai© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Network environment customize.
• Align company compliance.
• Audit.
• Security.
• Cost.
• Clusters have difference topology.
• Want more specific features.
• ....
Why build Kubernetes by ourselves?
- 22. @k2r2bai© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
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© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
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?
- 25. @k2r2bai© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Agility: The ability to easily and atomically update software
is the only way to improve internet security.
• Portability: Containers turn apps into integral units that can
migrate easily between machines and between providers.
• Security: Today’s VM-focused workflow ties the OS directly
to the apps on the box. Moving dependencies out of the OS
and into a container dramatically reduces complexity.
• Make sure that all resources are IMMUTABLE!
Why do we useCoreOS?
- 26. @k2r2bai© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
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
- 30. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Vishwakarma for Self-hosting Kubernetes
- 31. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Vishwakarma for EKS