{"id":15664817,"url":"https://github.com/graykode/aws-kubeadm-terraform","last_synced_at":"2025-07-22T23:03:44.338Z","repository":{"id":110172803,"uuid":"195002065","full_name":"graykode/aws-kubeadm-terraform","owner":"graykode","description":"create kubernetes cluster on AWS only typing 'terraform apply' on 3 minutes.","archived":false,"fork":false,"pushed_at":"2019-07-05T04:46:54.000Z","size":498,"stargazers_count":16,"open_issues_count":1,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T19:37:17.859Z","etag":null,"topics":["aws","kubeadm","kubernetes","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graykode.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-03T07:28:01.000Z","updated_at":"2022-12-11T16:59:30.000Z","dependencies_parsed_at":"2023-04-19T17:01:17.367Z","dependency_job_id":null,"html_url":"https://github.com/graykode/aws-kubeadm-terraform","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/graykode/aws-kubeadm-terraform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graykode%2Faws-kubeadm-terraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graykode%2Faws-kubeadm-terraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graykode%2Faws-kubeadm-terraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graykode%2Faws-kubeadm-terraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graykode","download_url":"https://codeload.github.com/graykode/aws-kubeadm-terraform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graykode%2Faws-kubeadm-terraform/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266586905,"owners_count":23952205,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aws","kubeadm","kubernetes","terraform"],"created_at":"2024-10-03T13:44:13.853Z","updated_at":"2025-07-22T23:03:44.298Z","avatar_url":"https://github.com/graykode.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"## aws-terraform-kubeAdm\n\nIn this repository, you can create kubernetes cluster using only `terraform apply` in AWS.\n\n![](aws.png)\n\n\n\n### 1. Configure on your docker\n\n```bash\n$ docker run -it graykode/aws-kubeadm-terraform:0.3 /bin/bash\n```\n\nExport your own AWS Access / Secret keys\n\n```bash\n$ export AWS_ACCESS_KEY_ID=\u003cYour Access Key in AWS\u003e\n$ export AWS_SECRET_ACCESS_KEY=\u003cYour Access Key in Secret\u003e\n```\n\nGenerate your SSH key pair for aws_key_pair\n\n```bash\n$ ssh-keygen -t rsa -N \"\" -f tf-kube\n```\n\nCreate your `k8stoken`\n\n```bash\n$ python -c 'import random; print \"%0x.%0x\" % (random.SystemRandom().getrandbits(3*8), random.SystemRandom().getrandbits(8*8))'\n\n\u003e ebd70e.ad84c12d14ee5dae\n```\n\n\n\n### 2. Create Kubernetes Cluster\n\nInitialize terraform\n\n```bash\n$ terraform init \n```\n\nCreate all objects in AWS and put k8s token before you created! It's Done.\n\n```bash\n$ terraform apply\nvar.k8stoken\n  Enter a value: ebd70e.ad84c12d14ee5dae\n```\n\nCheck if k8s Cluster is created.\n\n```bash\n$ ssh -i tf-kube ubuntu@server-ip\nubuntu@ip-10-43-0-40:~$ kubectl get nodes\nNAME                                            STATUS   ROLES    AGE     VERSION\nip-10-43-0-30.ap-northeast-2.compute.internal   Ready    \u003cnone\u003e   3m40s   v1.15.0\nip-10-43-0-40.ap-northeast-2.compute.internal   Ready    master   4m4s    v1.15.0\n```\n\nIf you want to delete all cluster, type this.\n\n```bash\n$ terraform destroy\n```\n\n\n\n#### If you want to see Kubernetes Clustering Step.\n\n```bash\n$ tail -f /home/ubuntu/master.log # in master node\n$ tail -f /home/ubuntu/worker.log # in worker node\n$ tail -f /home/ubuntu/etcd.log # in etcd node\n```\n\n### 3. Set [variables.tf](https://github.com/graykode/aws-kubeadm-terraform/blob/master/variables.tf)\n\n\u003cimg src=\"https://github.com/alicek106/aws-terraform-kubernetes/blob/master/pictures/kube2.png?raw=true\" style=\"width:600px;\"/\u003e\n\n1. Set EC2 instance_type\n```javascript\nvariable etcd_instance_type {\n  default = \"t2.medium\"\n}\nvariable controller_instance_type {\n  default = \"t2.medium\"\n}\nvariable worker_instance_type {\n  default = \"t2.medium\"\n}\n```\n\n2. Set Number of EC2 Node \n\n```javascript\nvariable number_of_etcd{\n  description = \"The number of etcd, only acts as etcd\"\n  default = 0\n}\n\nvariable number_of_worker{\n  description = \"The number of worker nodes\"\n  default = 1\n}\n```\n\n\n\n#### PS\n\nIf you meet `provider.aws: error validating provider credentials` Error, Please check that your IAM key is activate.\n\n#### ToDo\n- Set up a High Availability etcd cluster with kubeadm\n- Add k8s master node ingress, ingress-controller with ELB\n\n### Author\n\n- Reference : [alicek106/aws-terraform-kubernetes](https://github.com/alicek106/aws-terraform-kubernetes), [cablespaghetti/kubeadm-aws](https://github.com/cablespaghetti/kubeadm-aws)\n- Tae Hwan Jung(Jeff Jung) @graykode\n- Author Email : [nlkey2022@gmail.com](mailto:nlkey2022@gmail.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraykode%2Faws-kubeadm-terraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraykode%2Faws-kubeadm-terraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraykode%2Faws-kubeadm-terraform/lists"}