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

Updated the example for the private eks cluster with additional details and individual stacks for vpc, eks cluster and add-ons #388

Merged
merged 166 commits into from
Jun 28, 2022

Conversation

satveerkhurpa
Copy link
Contributor

What does this PR do?

This PR updates the example to provision a private eks cluster. The updates includes individual terraform stacks to set up the VPC, the eks cluster and add-ons. also includes a high level design that shows the users on how they can use a jenkins host or a bastion host from the default vpc, a peering connection between the default vpc and the eks vpc to complete the set up of the private eks cluster.

Motivation

Users will have an example to provision a private eks cluster the right way.

More

  • [ x] Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • [ x] Yes, I have added a new example under examples to support my PR
  • [x ] Yes, I have created another PR for add-ons under add-ons repo (if applicable)
  • [x ] Yes, I have updated the docs for this feature
  • Yes, I ran pre-commit run -a with this PR

Note: Not all the PRs required examples and docs except a new pattern or add-on added.

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

This following command used to update the `kubeconfig` in your local machine where you run kubectl commands to interact with your EKS Cluster.

#### Step5: Run `update-kubeconfig` command
Here is the high level design of the solution. The solution has been split into 3 different TerraForm stacks for simplicity.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Terraform

enable_vpa = true
enable_yunikorn = false
enable_argo_rollouts = false

Copy link
Contributor

@kcoleman731 kcoleman731 Apr 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra line. Also add-ons default to false so feel free to omit add-ons no used.

@@ -0,0 +1,116 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright headers not needed

}
}

data "aws_region" "current" {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put in a data.tf file for consistency

public_subnet_ids = data.terraform_remote_state.vpc_s3_backend.outputs.public_subnets

cluster_name = join("-", [local.tenant, local.environment, local.zone, "eks"])

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extran line

subnet_ids = local.private_subnet_ids
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a new line

default = {}
}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra line

create = true
vpc_id = module.aws_vpc.vpc_id
security_group_ids = [
data.aws_security_group.default.id]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format

output "public_subnets" {
description = "List of IDs of public subnets"
value = module.aws_vpc.public_subnets
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

Copy link
Contributor

@kcoleman731 kcoleman731 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great some nit comments for you. Please connect with @Zvikan on adding this into e2e tests.

@satveerkhurpa
Copy link
Contributor Author

Looking great some nit comments for you. Please connect with @Zvikan on adding this into e2e tests.

@kcoleman731 - Pushed updates based on review comments.

@satveerkhurpa satveerkhurpa temporarily deployed to EKS Blueprints Test June 24, 2022 14:21 Inactive
Copy link
Contributor

@askulkarni2 askulkarni2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the minor comments otherwise its ready to go.

examples/fully-private-eks-cluster/vpc/vpc-peer.tf Outdated Show resolved Hide resolved
@satveerkhurpa satveerkhurpa temporarily deployed to EKS Blueprints Test June 28, 2022 19:00 Inactive
Copy link
Contributor

@askulkarni2 askulkarni2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the PR @satveerkhurpa.

@askulkarni2 askulkarni2 merged commit 0cf6f10 into aws-ia:main Jun 28, 2022
allamand pushed a commit to allamand/terraform-aws-eks-blueprints that referenced this pull request Dec 15, 2022
…ls and individual stacks for vpc, eks cluster and add-ons (aws-ia#388)
alidonmez pushed a commit to alidonmez/terraform-aws-eks-blueprints-1 that referenced this pull request Mar 25, 2023
fix: Add missing try entries in IDE environment variable block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants