/eks-with-istio

:whale: :package: :rocket: - Terraform template for a production ready EKS Cluster and ISTIO Service Mesh

Primary LanguageHCLMIT LicenseMIT

Welcome to EKS with Istio Setup with Terraform 👋

Version Documentation License: MIT Twitter: fidelissauro

Terraform Versions Compatibility

Terraform 0.13 Terraform 0.14 Terraform 0.15 Terraform 1.0.0 Terraform 1.1.0

topology

Requirements

Name Version
aws ~> 4.0
helm ~> 2.0
kubectl ~> 1.14
kubernetes ~> 2.0
tls ~> 3.1.0

Providers

Name Version
aws 4.67.0
helm 2.11.0
kubectl 1.14.0
kubernetes 2.23.0
tls 3.1.0

Modules

No modules.

Resources

Name Type
aws_api_gateway_vpc_link.nlb resource
aws_cloudwatch_event_rule.node_termination_handler_instance_terminate resource
aws_cloudwatch_event_rule.node_termination_handler_rebalance resource
aws_cloudwatch_event_rule.node_termination_handler_scheduled_change resource
aws_cloudwatch_event_rule.node_termination_handler_spot_termination resource
aws_cloudwatch_event_rule.node_termination_handler_state_change resource
aws_cloudwatch_event_target.node_termination_handler_instance_terminate resource
aws_cloudwatch_event_target.node_termination_handler_rebalance resource
aws_cloudwatch_event_target.node_termination_handler_scheduled_change resource
aws_cloudwatch_event_target.node_termination_handler_spot_termination resource
aws_cloudwatch_event_target.node_termination_handler_state_change resource
aws_eip.vpc_iep resource
aws_eks_addon.cni resource
aws_eks_addon.coredns resource
aws_eks_addon.csi_driver resource
aws_eks_addon.kubeproxy resource
aws_eks_cluster.eks_cluster resource
aws_eks_node_group.cluster resource
aws_iam_instance_profile.nodes resource
aws_iam_openid_connect_provider.eks resource
aws_iam_policy.aws_load_balancer_controller_policy resource
aws_iam_policy.aws_node_termination_handler_policy resource
aws_iam_policy.cluster_autoscaler_policy resource
aws_iam_policy.csi_driver resource
aws_iam_policy.karpenter_policy resource
aws_iam_policy.keda_policy resource
aws_iam_policy_attachment.aws_load_balancer_controller_policy resource
aws_iam_policy_attachment.aws_node_termination_handler_policy resource
aws_iam_policy_attachment.cluster_autoscaler resource
aws_iam_policy_attachment.csi_driver resource
aws_iam_policy_attachment.karpenter_policy resource
aws_iam_policy_attachment.keda resource
aws_iam_role.alb_controller resource
aws_iam_role.aws_node_termination_handler_role resource
aws_iam_role.cluster_autoscaler_role resource
aws_iam_role.eks_cluster_role resource
aws_iam_role.eks_nodes_roles resource
aws_iam_role.karpenter_role resource
aws_iam_role.keda_role resource
aws_iam_role_policy_attachment.cloudwatch resource
aws_iam_role_policy_attachment.cni resource
aws_iam_role_policy_attachment.ecr resource
aws_iam_role_policy_attachment.eks-cluster-cluster resource
aws_iam_role_policy_attachment.eks-cluster-service resource
aws_iam_role_policy_attachment.node resource
aws_iam_role_policy_attachment.ssm resource
aws_internet_gateway.gw resource
aws_kms_alias.eks resource
aws_kms_key.eks resource
aws_launch_template.karpenter resource
aws_lb.ingress resource
aws_lb_listener.ingress_443 resource
aws_lb_listener.ingress_80 resource
aws_lb_target_group.http resource
aws_lb_target_group.https resource
aws_nat_gateway.nat resource
aws_route.nat_access resource
aws_route.public_internet_access resource
aws_route53_record.nlb resource
aws_route53_zone.private resource
aws_route_table.igw_route_table resource
aws_route_table.nat resource
aws_route_table_association.pods_1a resource
aws_route_table_association.pods_1b resource
aws_route_table_association.pods_1c resource
aws_route_table_association.private1a resource
aws_route_table_association.private1b resource
aws_route_table_association.private1c resource
aws_route_table_association.public_1a resource
aws_route_table_association.public_1b resource
aws_route_table_association.public_1c resource
aws_security_group.cluster_nodes_sg resource
aws_security_group.cluster_sg resource
aws_security_group_rule.cluster_ingress_https resource
aws_security_group_rule.nodeport resource
aws_security_group_rule.nodeport_cluster resource
aws_security_group_rule.nodeport_cluster_udp resource
aws_sqs_queue.node_termination_handler resource
aws_sqs_queue_policy.node_termination_handler resource
aws_subnet.pods_subnet_1a resource
aws_subnet.pods_subnet_1b resource
aws_subnet.pods_subnet_1c resource
aws_subnet.private_subnet_1a resource
aws_subnet.private_subnet_1b resource
aws_subnet.private_subnet_1c resource
aws_subnet.public_subnet_1a resource
aws_subnet.public_subnet_1b resource
aws_subnet.public_subnet_1c resource
aws_vpc.cluster_vpc resource
aws_vpc_ipv4_cidr_block_association.pods resource
helm_release.alb_ingress_controller resource
helm_release.argo_rollouts resource
helm_release.chaos_mesh resource
helm_release.cluster_autoscaler resource
helm_release.descheduler resource
helm_release.istio_base resource
helm_release.istio_ingress resource
helm_release.istiod resource
helm_release.jaeger resource
helm_release.karpenter resource
helm_release.keda resource
helm_release.kiali-server resource
helm_release.kube_state_metrics resource
helm_release.metrics_server resource
helm_release.node_termination_handler resource
helm_release.prometheus resource
kubectl_manifest.grafana_gateway resource
kubectl_manifest.grafana_service resource
kubectl_manifest.istio_target_group_binding_http resource
kubectl_manifest.istio_target_group_binding_https resource
kubectl_manifest.jaeger_gateway resource
kubectl_manifest.jaeger_virtual_service resource
kubectl_manifest.karpenter_provisioner resource
kubectl_manifest.karpenter_template resource
kubectl_manifest.kiali_gateway resource
kubectl_manifest.kiali_virtual_service resource
kubernetes_config_map.aws-auth resource
aws_caller_identity.current data source
aws_eks_cluster_auth.default data source
aws_iam_policy_document.aws_load_balancer_controller_assume_role data source
aws_iam_policy_document.aws_load_balancer_controller_policy data source
aws_iam_policy_document.aws_node_termination_handler_policy data source
aws_iam_policy_document.aws_node_termination_handler_role data source
aws_iam_policy_document.cluster_autoscaler_policy data source
aws_iam_policy_document.cluster_autoscaler_role data source
aws_iam_policy_document.csi_driver data source
aws_iam_policy_document.eks_cluster_role data source
aws_iam_policy_document.eks_nodes_role data source
aws_iam_policy_document.karpenter_policy data source
aws_iam_policy_document.karpenter_role data source
aws_iam_policy_document.keda_policy data source
aws_iam_policy_document.keda_role data source
aws_ssm_parameter.eks data source
tls_certificate.eks data source

Inputs

Name Description Type Default Required
addon_cni_version VPC CNI Version string "v1.14.1-eksbuild.1" no
addon_coredns_version CoreDNS Version string "v1.10.1-eksbuild.4" no
addon_csi_version CSI Version string "v1.24.0-eksbuild.1" no
addon_kubeproxy_version Kubeproxy Version string "v1.28.1-eksbuild.1" no
argo_rollouts_toggle Enable Argo Rollouts Installation bool true no
auto_scale_options n/a map
{
"desired": 6,
"max": 10,
"min": 4
}
no
aws_region n/a string "us-east-1" no
chaos_mesh_toggle Enable Chaos Mesh Installation bool false no
cluster_autoscaler_toggle Enable Cluster Autoscaler Installation bool false no
cluster_name n/a string "eks-cluster" no
cluster_private_zone n/a string "k8s.cluster" no
default_tags n/a map
{
"Environment": "prod",
"Foo": "Bar",
"Ping": "Pong"
}
no
descheduler_toggle Enable Descheduler Installation bool false no
enable_cross_zone_load_balancing n/a bool false no
grafana_virtual_service_host n/a string "grafana.k8s.raj.ninja" no
istio_ingress_max_pods Maximum pods for istio-ingress-gateway number 9 no
istio_ingress_min_pods Minimum pods for istio-ingress-gateway number 3 no
jaeger_virtual_service_host n/a string "jaeger.k8s.raj.ninja" no
k8s_version n/a string "1.28" no
karpenter_availability_zones Availability zones to launch nodes list
[
"us-east-1a",
"us-east-1b",
"us-east-1c"
]
no
karpenter_capacity_type Capacity Type; Ex spot, on_demand list
[
"spot"
]
no
karpenter_instance_family Instance family list to launch on karpenter list
[
"c6",
"c6a",
"c5"
]
no
karpenter_instance_sizes Instance sizes to diversify into instance family list
[
"large",
"2xlarge"
]
no
karpenter_toggle Enable Karpenter Installation bool true no
keda_toggle Enable Keda Installation bool true no
kiali_virtual_service_host n/a string "kiali.k8s.raj.ninja" no
nlb_ingress_enable_termination_protection n/a bool false no
nlb_ingress_internal n/a bool false no
nlb_ingress_type n/a string "network" no
node_termination_handler_toggle Enable AWS Node Termination Handler Setup bool true no
nodes_instances_sizes n/a list
[
"t3.large"
]
no
proxy_protocol_v2 n/a bool false no

Outputs

Name Description
cluster_name n/a
istio_ingress_vpclink n/a

Demo

Install

terraform apply

Usage

terraform apply

Run tests

terraform plan

Author

👤 Matheus Fidelis

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2021 Matheus Fidelis.
This project is MIT licensed.


_This README was generated with ❤️ by readme-md-generator_