Provisioning Production-Ready Amazon EKS Clusters Using Terraform AWS Prescriptive Guidance Provisioning Production- Ready Amazon EKS Clusters Using Terraform

Provisioning Production-Ready Amazon EKS Clusters Using Terraform AWS Prescriptive Guidance Provisioning Production- Ready Amazon EKS Clusters Using Terraform

AWS Prescriptive Guidance Provisioning production-ready Amazon EKS clusters using Terraform AWS Prescriptive Guidance Provisioning production- ready Amazon EKS clusters using Terraform AWS Prescriptive Guidance: Provisioning production-ready Amazon EKS clusters using Terraform Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. AWS Prescriptive Guidance Provisioning production- ready Amazon EKS clusters using Terraform Table of Contents Introduction ...................................................................................................................................... 1 Solution outcomes ..................................................................................................................... 2 Development environment requirements and code repository ................................................................. 3 Development environment requirements ....................................................................................... 3 Code repository for the solution .................................................................................................. 3 High-level architecture ........................................................................................................................ 5 Typical Amazon EKS architecture ................................................................................................. 5 Planned high-level architecture .................................................................................................... 5 Helm add-ons and Kubernetes Cluster Autoscaler .................................................................................. 7 Kubernetes Cluster Autoscaler ..................................................................................................... 7 Logging and monitoring Amazon EKS clusters ....................................................................................... 8 Resources ....................................................................................................................................... 10 .............................................................................................................................................. 10 AWS Prescriptive Guidance glossary .................................................................................................... 11 Document history ............................................................................................................................. 18 iii AWS Prescriptive Guidance Provisioning production- ready Amazon EKS clusters using Terraform Provisioning production-ready Amazon EKS clusters using Terraform Jomcy Pappachen, Consultant, AWS Professional Services Vara Bonthu, Senior Big Data Architect, AWS Professional Services Ulaganathan N, Associate Consultant, AWS Professional Services July 2021 Kubernetes is an open-source system for automating and managing containerized applications at scale. Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that runs container application workloads and helps standardize operations across your environments (for example, production or development environments). You can manage modern infrastructures by using infrastructure as code (IaC) practices with tools such as AWS CloudFormation, AWS Cloud Development Kit (CDK) , or Terraform by Hashicorp. This guide is intended for solution architects and technical leaders who are responsible for designing production-ready Amazon EKS clusters to run modernized workloads. The solution uses Terraform to build an IaC framework that provisions a multi-tenant Amazon EKS cluster. The guide describes the outcomes, design, architecture, and implementation of Amazon EKS clusters for running modernized application workloads. By using this guide's solution, you can quickly create the infrastructure to migrate live-traffic serving self-hosted Kubernetes clusters to Amazon EKS on the AWS Cloud. The guide also provides a framework to help you design and create Amazon EKS clusters, each with a unique Terraform configuration and state file, in different environments across multiple AWS accounts and AWS Regions. When you want to modernize your applications with microservices and Kubernetes, you can use this guide and its reference code in the GitHub aws-eks-accelerator-for-terraform repository to build the Amazon EKS infrastructure on the AWS Cloud. This provisions Amazon EKS clusters, managed node groups with On-Demand and Spot Amazon Elastic Compute Cloud (Amazon EC2) instance types, AWS Fargate profiles, and plugins or add-ons for creating production-ready Amazon EKS clusters. The Terraform Helm provider also deploys common Kubernetes add-ons by using Helm charts. The guide has the following five sections: • Development environment requirements and code repository (p. 3) – Provides the software, tools, and GitHub repository to implement this guide's solution. • High-level architecture (p. 5) – Explains the high-level architectural design of the guide's solution. • Helm add-ons and Kubernetes Cluster Autoscaler (p. 7) – Describes how to implement the Helm modules by using Terraform Helm provider and how the Kubernetes Cluster Autoscaler helps scale Amazon EKS clusters. • Logging and monitoring Amazon EKS clusters (p. 8)– Discusses the centralized logging and monitoring solutions that can be implemented for Amazon EKS clusters. After provisioning the Amazon EKS clusters, you can deploy the examples from Examples directory in the GitHub aws-eks-accelerator-for-terraform repository. However, this guide doesn't provide a complete overview of all implementations and we recommend that you carefully evaluate all third-party or open- source tools according to your organization's policies and requirements. 1 AWS Prescriptive Guidance Provisioning production- ready Amazon EKS clusters using Terraform Solution outcomes Solution outcomes You should expect the following eight outcomes from deploying this guide’s solution in your AWS accounts: • Enable your cross-functional teams to use the same Amazon EKS cluster by provisioning Amazon EKS clusters that support multi-tenancy based on applications and namespaces. • Provision Amazon EKS clusters in new or existing virtual private clouds (VPCs), which means that you can use existing VPCs if required. • Define your scaling metrics as a Kubernetes manifest by using Kubernetes Horizontal Pod Autoscaling and configurable options for expanding resource quotas and pod security policies. • Ensure role-based access control (RBAC) for your developers and administrators by using AWS Identity and Access Management (IAM) roles. • Deploy a private Amazon EKS cluster to secure your application and meet your compliance requirements. • Monitor and log applications and system pods by using Amazon CloudWatch to collect and track metrics. • Flexibly provision your Amazon EKS clusters with different node group types by running a combination of self-managed nodes, Amazon EKS managed node groups, and Fargate. • Deploy a Bottlerocket Amazon Machine Image (AMI) in self-managed node groups to run container workloads in a purpose-built operating system (OS) on the AWS Cloud. 2 AWS Prescriptive Guidance Provisioning production- ready Amazon EKS clusters using Terraform Development environment requirements Development environment requirements and code repository The following sections describe the software and tools required to set up your development environment, in addition to the tools required to validate and monitor your Amazon Elastic Kubernetes Service (Amazon EKS) clusters. An overview is also provided of the GitHub aws-eks-accelerator-for- terraform repository that contains the code for this guide's solution. Development environment requirements The following table shows the tools and versions to set up the development environment for building and deploying the guide's solution. Tool Version Purpose Git 2.31.1 Version control Terraform 0.14.0 IaC Helm 3 3.0.x Kubernetes packaging kubectl 1.18 Kubernetes command line interface Kubernetes Lens V4.2.2 User interface (UI) for cluster monitoring IntelliJ IDEA Community Edition 2020.4 Integrated development environment (IDE) Code repository for the solution The code framework in the GitHub aws-eks-accelerator-for-terraform repository helps you to create Amazon EKS clusters, each with unique Terraform configuration and state files, in different environments across multiple AWS accounts and AWS Regions. The following list provides the outline of the repository's contents: • The top-level live directory contains the configuration for each Amazon EKS cluster. Each folder under live/<region>/application represents an Amazon EKS cluster environment (for example, development or testing). This directory contains the backend.conf and base.tfvars files that create a unique Terraform state for each Amazon EKS cluster environment. You can update backend.conf with the Terraform backend configuration and base.tfvars with the Amazon EKS cluster common configuration variables. • The source directory contains the main.tf main driver file. • The modules directory contains the AWS resource

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    21 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us