Skip to content

Latest commit

 

History

History
105 lines (89 loc) · 9.15 KB

README.md

File metadata and controls

105 lines (89 loc) · 9.15 KB

Terraform EKS Autoscaling

TODO

Stage 1

  • We Install and Manage EKS with Terraform
  • We also use Terraform for Cluster Addons Autoscaling

Requirements

Tools

Terraform

Name Version
aws = 4.8.0
helm = 2.5.0
kubernetes = 2.9.0

Providers

Name Version
aws 4.8.0
helm 2.5.0
kubernetes 2.9.0
null 3.1.1
tls 3.2.1

Modules

Name Source Version
eks terraform-aws-modules/eks/aws 18.17.0
vpc terraform-aws-modules/vpc/aws ~> 3.0

Resources

Name Type
aws_iam_role.autoscaler resource
aws_iam_role_policy.autoscaler resource
aws_key_pair.kp resource
aws_kms_key.ebs resource
aws_kms_key.eks resource
aws_security_group.additional resource
aws_security_group.remote_access resource
helm_release.autoscaling resource
kubernetes_namespace.autoscaling resource
null_resource.oidc resource
null_resource.patch resource
tls_private_key.pk resource
aws_availability_zones.available data source
aws_caller_identity.current data source
aws_eks_cluster.cluster data source
aws_eks_cluster_auth.cluster data source
aws_eks_cluster_auth.this data source
aws_iam_policy_document.ebs data source

Inputs

Name Description Type Default Required
autoscaling_chart_name Autoscaling Helm chart name. string "cluster-autoscaler" no
autoscaling_chart_repo Autoscaling Helm repository name. string "https://kubernetes.github.io/autoscaler" no
autoscaling_chart_version Autoscaling Helm chart version. string "9.11.0" no
autoscaling_namespace Autoscaling Namespace. string "autoscaler" no
cluster_name EKS cluster name. string "k8s-test" no
cluster_version Which EKS version of K8s to run string "1.21" no
name_prefix Prefix to be used on each infrastructure object Name created in AWS. string "eks" no
tags n/a map(string)
{
"managered": "terraform",
"owner": "DevOps"
}
no

Outputs

Name Description
aws_auth_configmap_yaml Formatted yaml output for base aws-auth configmap containing roles used in cluster node groups/fargate profiles
cloudwatch_log_group_arn Arn of cloudwatch log group created
cloudwatch_log_group_name Name of cloudwatch log group created
cluster_addons Map of attribute maps for all EKS cluster addons enabled
cluster_arn The Amazon Resource Name (ARN) of the cluster
cluster_certificate_authority_data Base64 encoded certificate data required to communicate with the cluster
cluster_endpoint Endpoint for your Kubernetes API server
cluster_iam_role_arn IAM role ARN of the EKS cluster
cluster_iam_role_name IAM role name of the EKS cluster
cluster_iam_role_unique_id Stable and unique string identifying the IAM role
cluster_id The name/id of the EKS cluster. Will block on cluster creation until the cluster is really ready
cluster_identity_providers Map of attribute maps for all EKS identity providers enabled
cluster_oidc_issuer_url The URL on the EKS cluster for the OpenID Connect identity provider
cluster_platform_version Platform version for the cluster
cluster_primary_security_group_id Cluster security group that was created by Amazon EKS for the cluster. Managed node groups use this security group for control-plane-to-data-plane communication. Referred to as 'Cluster security group' in the EKS console
cluster_security_group_arn Amazon Resource Name (ARN) of the cluster security group
cluster_security_group_id ID of the cluster security group
cluster_status Status of the EKS cluster. One of CREATING, ACTIVE, DELETING, FAILED
eks_managed_node_groups Map of attribute maps for all EKS managed node groups created
node_security_group_arn Amazon Resource Name (ARN) of the node shared security group
node_security_group_id ID of the node shared security group
oidc_provider The OpenID Connect identity provider (issuer URL without leading https://)
oidc_provider_arn The ARN of the OIDC Provider if enable_irsa = true