Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Refactor examples to leverage terraform-aws-eks for cluster creation #1074

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/e2e-parallel-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,11 @@ jobs:
- example_path: examples/eks-cluster-with-new-vpc
- example_path: examples/fargate-serverless
# - example_path: examples/fully-private-eks-cluster # skipping until issue #711 is addressed
- example_path: examples/game-tech/agones-game-controller
- example_path: examples/gitops/argocd
# - example_path: examples/ingress-controllers/nginx # ignoring due to https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/1629
bryantbiggs marked this conversation as resolved.
Show resolved Hide resolved
- example_path: examples/ipv6-eks-cluster
- example_path: examples/karpenter
- example_path: examples/multi-tenancy-with-teams
- example_path: examples/node-groups/fargate-profiles
- example_path: examples/node-groups/managed-node-groups
- example_path: examples/node-groups/self-managed-node-groups
- example_path: examples/node-groups/windows-node-groups
- example_path: examples/stateful
- example_path: examples/vpc-cni-custom-networking
steps:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/e2e-parallel-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,11 @@ jobs:
- example_path: examples/eks-cluster-with-new-vpc
- example_path: examples/fargate-serverless
# - example_path: examples/fully-private-eks-cluster # skipping until issue #711
- example_path: examples/game-tech/agones-game-controller
- example_path: examples/gitops/argocd
# - example_path: examples/ingress-controllers/nginx # ignoring due to https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/1629
bryantbiggs marked this conversation as resolved.
Show resolved Hide resolved
- example_path: examples/ipv6-eks-cluster
- example_path: examples/karpenter
- example_path: examples/multi-tenancy-with-teams
- example_path: examples/node-groups/fargate-profiles
- example_path: examples/node-groups/managed-node-groups
- example_path: examples/node-groups/self-managed-node-groups
- example_path: examples/node-groups/windows-node-groups
- example_path: examples/stateful
- example_path: examples/vpc-cni-custom-networking
steps:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/plan-examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ def get_examples():
"""
exclude = {
'examples/eks-cluster-with-external-dns', # excluded until Rout53 is setup
'examples/ci-cd/gitlab-ci-cd', # excluded since GitLab auth, backend, etc. required
'examples/gitlab-ci-cd', # excluded since GitLab auth, backend, etc. required
'examples/fully-private-eks-cluster/vpc', # skipping until issue #711 is addressed
'examples/fully-private-eks-cluster/eks',
'examples/fully-private-eks-cluster/add-ons',
'examples/ai-ml/ray', # excluded until #887 is fixed
'examples/portworx', # excluded due to policy not known at plan/apply time
}

projects = {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
TERRAFORM_DOCS_VERSION: v0.16.0
TFSEC_VERSION: v1.22.0
TF_PLUGIN_CACHE_DIR: ${{ github.workspace }}/.terraform.d/plugin-cache
TFLINT_VERSION: v0.38.1
TFLINT_VERSION: v0.41.0

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
Expand Down
61 changes: 0 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,71 +22,12 @@ For complete project documentation, please visit our [documentation site](https:

To view examples for how you can leverage EKS Blueprints, please see the [examples](https://github.com/aws-ia/terraform-aws-eks-blueprints/tree/main/examples) directory.

## Usage

The below demonstrates how you can leverage EKS Blueprints to deploy an EKS cluster, a managed node group, and various Kubernetes add-ons.

```hcl
module "eks_blueprints" {
source = "github.com/aws-ia/terraform-aws-eks-blueprints?ref=v4.12.0"

# EKS CLUSTER
cluster_version = "1.23"
vpc_id = "<vpcid>" # Enter VPC ID
private_subnet_ids = ["<subnet-a>", "<subnet-b>", "<subnet-c>"] # Enter Private Subnet IDs

# EKS MANAGED NODE GROUPS
managed_node_groups = {
mg_m5 = {
node_group_name = "managed-ondemand"
instance_types = ["m5.large"]
subnet_ids = ["<subnet-a>", "<subnet-b>", "<subnet-c>"]
}
}
}

module "eks_blueprints_kubernetes_addons" {
source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons?ref=v4.12.0"

eks_cluster_id = module.eks_blueprints.eks_cluster_id

# EKS Addons
enable_amazon_eks_vpc_cni = true
enable_amazon_eks_coredns = true
enable_amazon_eks_kube_proxy = true
enable_amazon_eks_aws_ebs_csi_driver = true

#K8s Add-ons
enable_argocd = true
enable_aws_for_fluentbit = true
enable_aws_load_balancer_controller = true
enable_cluster_autoscaler = true
enable_metrics_server = true
enable_prometheus = true
}
```

The code above will provision the following:

- ✅ A new EKS Cluster with a managed node group.
- ✅ Amazon EKS add-ons `vpc-cni`, `CoreDNS`, `kube-proxy`, and `aws-ebs-csi-driver`.
- ✅ `Cluster Autoscaler` and `Metrics Server` for scaling your workloads.
- ✅ `Fluent Bit` for routing logs.
- ✅ `AWS Load Balancer Controller` for distributing traffic.
- ✅ `Argocd` for declarative GitOps CD for Kubernetes.
- ✅ `Prometheus` for observability.

## Add-ons

EKS Blueprints makes it easy to provision a wide range of popular Kubernetes add-ons into an EKS cluster. By default, the [Terraform Helm provider](https://github.com/hashicorp/terraform-provider-helm) is used to deploy add-ons with publicly available [Helm Charts](https://artifacthub.io/).EKS Blueprints provides support for leveraging self-hosted Helm Chart as well.

For complete documentation on deploying add-ons, please visit our [add-on documentation](https://aws-ia.github.io/terraform-aws-eks-blueprints/latest/add-ons/)

## Submodules

The root module calls into several submodules which provides support for deploying and integrating a number of external AWS services that can be used in concert with Amazon EKS.
This includes Amazon Managed Prometheus and EMR on EKS. For complete documentation on deploying external services, please visit our [submodules documentation](https://aws-ia.github.io/terraform-aws-eks-blueprints/latest/modules/emr-on-eks/).

## Motivation

Kubernetes is a powerful and extensible container orchestration technology that allows you to deploy and manage containerized applications at scale. The extensible nature of Kubernetes also allows you to use a wide range of popular open-source tools, commonly referred to as add-ons, in Kubernetes clusters. With such a large number of tooling and design choices available however, building a tailored EKS cluster that meets your application’s specific needs can take a significant amount of time. It involves integrating a wide range of open-source tools and AWS services and requires deep expertise in AWS and Kubernetes.
Expand All @@ -99,8 +40,6 @@ EKS Blueprints for Terraform is maintained by AWS Solution Architects. It is not

To post feedback, submit feature ideas, or report bugs, please use the [Issues section](https://github.com/aws-ia/terraform-aws-eks-blueprints/issues) of this GitHub repo.

For architectural details, step-by-step instructions, and customization options, see our [documentation site](https://aws-ia.github.io/terraform-aws-eks-blueprints/).
bryantbiggs marked this conversation as resolved.
Show resolved Hide resolved

If you are interested in contributing to EKS Blueprints, see the [Contribution guide](https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/CONTRIBUTING.md).

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
Expand Down
6 changes: 1 addition & 5 deletions docs/add-ons/portworx.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@

- [Helm chart](https://github.com/portworx/helm)

## Examples Blueprint

To get started look at these sample [blueprints](../../examples/portworx).

## Requirements

For the add-on to work, Portworx needs additional permission to AWS resources which can be provided in the following way. For an example blueprint, click [here](../../examples/portworx).
For the add-on to work, Portworx needs additional permission to AWS resources which can be provided in the following way.

Note: Portworx currently does not support obtaining these permissions with an IRSA. Its support will be added with future releases.

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/bottlerocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Bottlerocket has two containers runtimes running. Control container **on** by default used for AWS Systems manager and remote API access. Admin container **off** by default for deep debugging and exploration.

Bottlerocket [Launch templates userdata](https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/modules/aws-eks-managed-node-groups/templates/userdata-bottlerocket.tpl) uses the TOML format with Key-value pairs.
Bottlerocket launch templates userdata uses the TOML format with Key-value pairs.
Remote API access API via SSM agent. You can launch trouble shooting container via user data `[settings.host-containers.admin] enabled = true`.

### Features
Expand Down
2 changes: 0 additions & 2 deletions docs/core-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ This document provides a high level overview of the Core Concepts that are embed

A `cluster` is simply an EKS cluster. EKS Blueprints provides for customizing the compute options you leverage with your `clusters`. The framework currently supports `EC2`, `Fargate` and `BottleRocket` instances. It also supports managed and self-managed node groups. To specify the type of compute you want to use for your `cluster`, you use the `managed_node_groups`, `self_managed_nodegroups`, or `fargate_profiles` variables.

See our [Node Groups](https://aws-ia.github.io/terraform-aws-eks-blueprints/latest/node-groups/) documentation and our [Node Group example directory](https://github.com/aws-ia/terraform-aws-eks-blueprints/tree/main/examples/node-groups) for detailed information.

## Add-on

`Add-ons` allow you to configure the operational tools that you would like to deploy into your EKS cluster. When you configure `add-ons` for a `cluster`, the `add-ons` will be provisioned at deploy time by leveraging the Terraform Helm provider. Add-ons can deploy both Kubernetes specific resources and AWS resources needed to support add-on functionality.
Expand Down
Loading