{"id":15645851,"url":"https://github.com/int128/terraform-aws-kops-alb","last_synced_at":"2025-10-14T02:30:23.203Z","repository":{"id":44382699,"uuid":"113824536","full_name":"int128/terraform-aws-kops-alb","owner":"int128","description":"Terraform module for ALB, Route53 and nginx-ingress with kops on AWS","archived":true,"fork":false,"pushed_at":"2020-07-04T12:48:38.000Z","size":440,"stargazers_count":52,"open_issues_count":4,"forks_count":23,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-10T12:38:35.141Z","etag":null,"topics":["acm","alb","aws","kops","kubernetes","nginx-ingress","terraform"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/int128/kops-alb","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/int128.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-11T07:03:00.000Z","updated_at":"2024-07-21T01:05:38.000Z","dependencies_parsed_at":"2022-07-14T13:20:34.565Z","dependency_job_id":null,"html_url":"https://github.com/int128/terraform-aws-kops-alb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fterraform-aws-kops-alb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fterraform-aws-kops-alb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fterraform-aws-kops-alb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fterraform-aws-kops-alb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/int128","download_url":"https://codeload.github.com/int128/terraform-aws-kops-alb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236433283,"owners_count":19148091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acm","alb","aws","kops","kubernetes","nginx-ingress","terraform"],"created_at":"2024-10-03T12:10:20.799Z","updated_at":"2025-10-14T02:30:17.883Z","avatar_url":"https://github.com/int128.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-aws-kops-alb [![CircleCI](https://circleci.com/gh/int128/terraform-aws-kops-alb.svg?style=shield)](https://circleci.com/gh/int128/terraform-aws-kops-alb)\n\nThis is a Terraform module which provides AWS ALB and Route53 for publishing services via nginx-ingress on kops.\n\nIt provides the following stack:\n\n![aws-diagram.png](images/aws-diagram.png)\n\nHTTPS requests are transfered to a pod via the external ALB and the node port of nginx-ingress (e.g. tcp/30080).\n\nThis is an open source software licensed under Apache License 2.0.\nFeel free to bring up issues and pull requests.\n\n## Example\n\nBootstrap a Kubernetes cluster:\n\n```sh\nexport AWS_DEFAULT_REGION=\"us-west-2\"\nexport KOPS_CLUSTER_NAME=\"hello.k8s.local\"\nkubernetes_ingress_domain=\"hello.example.com\"\nstate_store_bucket_name=\"state.hello.k8s.local\"\n\n# Create a public hosted zone for the domain\naws route53 create-hosted-zone --name \"$kubernetes_ingress_domain\" --caller-reference \"$(date)\"\n\n# Request a certificate for the wildcard domain\naws acm request-certificate --domain-name \"*.$kubernetes_ingress_domain\" --validation-method DNS\n\n# Create a bucket for the state store of kops and Terraform\naws s3api create-bucket \\\n  --bucket \"$state_store_bucket_name\" \\\n  --region \"$AWS_DEFAULT_REGION\" \\\n  --create-bucket-configuration \"LocationConstraint=$AWS_DEFAULT_REGION\"\naws s3api put-bucket-versioning \\\n  --bucket \"$state_store_bucket_name\" \\\n  --versioning-configuration \"Status=Enabled\"\n\n# Create a cluster\nkops create cluster --name \"$KOPS_CLUSTER_NAME\" --zones \"${AWS_DEFAULT_REGION}a\"\nkops update cluster --yes\n```\n\nLoad the module:\n\n```hcl\nmodule \"kops_alb\" {\n  source                    = \"int128/kops-alb/aws\"\n  kops_cluster_name         = \"hello.k8s.local\"\n  kubernetes_ingress_domain = \"hello.example.com\"\n}\n```\n\nRun Terraform and then install nginx-ingress:\n\n```sh\n# Create AWS resources\nterraform init\nterraform apply\n\n# Install Helm\nkubectl create -f helm-service-account.yaml\nhelm init --service-account tiller --history-max 100\n\n# Install nginx-ingress\nhelmfile sync\n```\n\nSee [examples](examples) for more.\n\n## Prerequisite\n\nThis module assumes the following resources exist:\n\n- Route53 hosted zone of the domain `kubernetes_ingress_domain`\n- ACM certificate of the wildcard domain `*.kubernetes_ingress_domain`\n- VPC for the cluster `kops_cluster_name`\n- Subnets for the cluster `kops_cluster_name`\n- Auto scaling group for the nodes of the cluster `kops_cluster_name`\n- Security group for the masters of the cluster `kops_cluster_name`\n- Security group for the nodes of the cluster `kops_cluster_name`\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|:----:|:-----:|:-----:|\n| alb\\_external\\_allow\\_ip | List of IP addresses to allow to the external ALB | list | `\u003clist\u003e` | no |\n| alb\\_internal\\_enabled | Enable the internal ALB (needed if the external ALB is not public) | string | `\"false\"` | no |\n| kops\\_cluster\\_name | Kubernetes cluster name | string | n/a | yes |\n| kops\\_ig\\_nodes\\_names | List of name of instance-group nodes managed by kops | list | `\u003clist\u003e` | no |\n| kubernetes\\_ingress\\_domain | Domain name for the external/internal ALB | string | n/a | yes |\n| kubernetes\\_ingress\\_port | Node port of the ingress controller | string | `\"30080\"` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| kops\\_cluster\\_name | Kubernetes cluster name |\n| kops\\_subnet\\_ids | IDs of subnets managed by kops |\n| kops\\_vpc\\_id | ID of VPC managed by kops |\n| sgid\\_allow\\_from\\_nodes | ID of security group which is allowed from Kubernetes nodes |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Fterraform-aws-kops-alb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fint128%2Fterraform-aws-kops-alb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Fterraform-aws-kops-alb/lists"}