Skip to content

Commit

Permalink
Initial cut at documentation/example
Browse files Browse the repository at this point in the history
  • Loading branch information
zawac002 committed Sep 1, 2023
1 parent 3dee7a1 commit 1d52043
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

Create an EKS cluster given the specification of the cluster.

**NOTE:** At this time, the cluster-admin group is not created in AWS due
to interactions with the ldap provider.

The module creates an EKS cluster with `eks_ng_desired_size` nodes initially.
The cluster-autoscaler will resize the node group based upon capacity from a
minimum of `eks_ng_min_size` to a maximum of `eks_ng_max_size`.
The `eks_instance_types` is a prioritized list of instance types to use as
the worker nodes.
Note that it is best if the vCPU and Mem sizes of all of the instance types
are the same.

Addons installed:
- aws-efs-csi-driver
- aws-ebs-csi-driver
- cluster-autoscaler
- coredns
- kube-proxy
- vpc-cni

Note that at this stage, the csi-drivers are not configured. That takes place in the eks-storage-classes module.

## Required Inputs

**cluster_name** `string`
Expand Down
18 changes: 18 additions & 0 deletions examples/simple/eks.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module "images" {
source = "git@github.it.census.gov:SOA/tfmod-eks.git//"
#source = "git@github.it.census.gov:SOA/tfmod-eks.git//?ref=v1.0.0"

region = var.region

profile = var.profile
vpc_name = var.vpc_name

cluster_name = var.cluster_name
cluster_version = var.cluster_version
domain = var.domain
eks_instance_disk_size = var.eks_instance_disk_size
eks_instance_types = var.eks_instance_types
eks_ng_desired_size = var.eks_ng_desired_size
eks_ng_max_size = var.eks_ng_max_size
eks_ng_min_size = var.eks_ng_min_size
}
60 changes: 60 additions & 0 deletions examples/simple/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
variable "cluster_name" {
description = "EKS cluster name name component used through out the EKS cluster describing its purpose (ex: dice-dev)"
type = string
}

variable "cluster_version" {
description = "The Kubernetes version number to use for this EKS cluster. See https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html"
type = string
default = "1.27"
}

variable "region" {
description = "AWS region"
type = string
}

variable "profile" {
description = "AWS Profile under which the scripts are run."
type = string
}

variable "vpc_name" {
description = "AWS vpc in which the cluster will reside"
type = string
}

variable "domain" {
description = "The DNS domain name of the cluster."
type = string
}

variable "eks_instance_disk_size" {
description = "The size of the disk of the worker nodes in gigabytes. 40 is the approximate minimum. Needs to hold the all of the normal operating system files plus every image that will be used in the cluster."
type = number
default = 40
}

variable "eks_instance_types" {
description = "EKS worker node instance types"
type = list(string)
default = [
"t3.xlarge"
]
}

variable "eks_ng_min_size" {
description = "Node Group minimum size"
type = number
default = 4
}
variable "eks_ng_desired_size" {
description = "Node Group desired size"
type = number
default = 4
}
variable "eks_ng_max_size" {
description = "Node Group maximum size"
type = number
default = 15
}

0 comments on commit 1d52043

Please sign in to comment.