{"id":16782223,"url":"https://github.com/abhinav-26/aws-kops-clustersetup","last_synced_at":"2026-05-10T16:43:26.998Z","repository":{"id":158389461,"uuid":"377072795","full_name":"Abhinav-26/AWS-Kops-ClusterSetup","owner":"Abhinav-26","description":"This repostory contains all the detailed instruction to create a production grade kubernetes cluster using Kops in AWS.","archived":false,"fork":false,"pushed_at":"2021-07-19T09:45:57.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T21:21:56.687Z","etag":null,"topics":["aws","aws-ec2","aws-kops","aws-s3","cluster-configs","k8s","k8s-cluster","k8s-deployment","kops","kops-cluster","kops-nodes","kubernetes","kubernetes-cluster"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Abhinav-26.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":"2021-06-15T07:21:15.000Z","updated_at":"2021-07-19T09:45:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"d1a8ef4f-bee7-4f82-a527-9d5ff4c85366","html_url":"https://github.com/Abhinav-26/AWS-Kops-ClusterSetup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Abhinav-26/AWS-Kops-ClusterSetup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhinav-26%2FAWS-Kops-ClusterSetup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhinav-26%2FAWS-Kops-ClusterSetup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhinav-26%2FAWS-Kops-ClusterSetup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhinav-26%2FAWS-Kops-ClusterSetup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abhinav-26","download_url":"https://codeload.github.com/Abhinav-26/AWS-Kops-ClusterSetup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhinav-26%2FAWS-Kops-ClusterSetup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265236722,"owners_count":23732497,"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":["aws","aws-ec2","aws-kops","aws-s3","cluster-configs","k8s","k8s-cluster","k8s-deployment","kops","kops-cluster","kops-nodes","kubernetes","kubernetes-cluster"],"created_at":"2024-10-13T07:44:42.887Z","updated_at":"2026-05-10T16:43:21.954Z","avatar_url":"https://github.com/Abhinav-26.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Kubernetes ClusterSetup with Kops\n\nThis repostory contains all the detailed instruction to create a production grade kubernetes cluster using Kops in AWS. To create a k8s cluster, please follow the following steps -\n\n### 1. Launch Linux EC2 instance in AWS (It will act as Kubernetes Client)\n### 2. Create and attach IAM role to EC2 Instance.\n\tPlease attach these policies to IAM role created as these are required by Kops\n\t\t AmazonS3FullAccess\n\t\t IAMFullAccess\n\t\t AmazonRoute53FullAccess\n\t\t AmazonEC2FullAccess\n\t\t AmazonVPCFullAccess\n \t\t \n### 3. Install Kops on EC2\n```sh\ncurl -LO https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '\"' -f 4)/kops-linux-amd64\nchmod +x kops-linux-amd64\nsudo mv kops-linux-amd64 /usr/local/bin/kops\n```\n\n### 4. Install kubectl\n```sh\ncurl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl\nchmod +x ./kubectl\nsudo mv ./kubectl /usr/local/bin/kubectl\n```\n### 5. Create S3 bucket in AWS\nS3 bucket is used by kubernetes to persist cluster state, lets create s3 bucket using aws cli\n**Note:**  Make sure you choose bucket name that is uniqe accross all aws accounts\n\n```sh\naws s3 mb s3://abhi.in.k8s --region us-east-2\n```\n### 6. Create private/pubic hosted zone in AWS Route53\n#### For private hosted zone\n ```\n 1. Head over to aws Route53 and create hostedzone\n 2. Choose name for example (abhi.in.k8s)\n 3. Choose type as privated hosted zone for VPC\n 4. Select default vpc in the region you are setting up your cluster\n 5. Hit create\n```\n#### For public hosted zone \n```\n 1. Head over to aws Route53 and create hostedzone\n 2. Choose your domain name for example (abhi.in)\n 3. Choose type as public hosted zone for VPC\n 4. Give description\n 5. Hit create\n```\n### 7 Configure environment variables.\nOpen .bashrc file \n```\n\tvi ~/.bashrc\n```\nAdd following content into .bashrc file, and make sure bucket name matches the one you created in step 5.\n\n```sh\nexport KOPS_STATE_STORE=s3://abhi.in.k8s\n```\nThen run the command to reflect variables added to .bashrc file\n```\n\tsource ~/.bashrc\n```\n### 8. Create ssh key pair\nThis keypair will be used for ssh into kubernetes cluster\n\n```sh\nssh-keygen\n```\n\n### 9. Create a Kubernetes cluster from the config file. \nMake sure to change config file with your cluster config file (if any) and make neccessary changes in config file as per your requirements.\n\n```sh\nkops create -f cluster-setup.yaml\n```\n\n### 10. Create secret to start with installation process\n\n```sh\nkops create secret --name test.domain.name sshpublickey admin -i ~/.ssh/id_rsa.pub\n```\n\n### 11. Create kubernetes cluster\nPlease don't forget to replace cluster name with your cluster name which you have given in your config file.\n\n```sh\nkops update cluster test.domain.name --yes \n```\nAbove command may take some time to create the required infrastructure resources on AWS. Execute the validate command to check its status and wait until the cluster becomes ready\n\n```sh\nkops validate cluster\n```\nFor the above above command, you might see validation failed error initially when you create cluster and it is expected behaviour, you have to wait for some more time and check again.\n\n### 12 To check all clusters created\n```sh\nkops get clusters\n```\n\n### 13 Congratulation!!!\nNow you can run all your kubectl commands and start deploying your applications over kubernetes. Run the following commands to check the cluster created and see the nodes available.\n\n```sh\nkubectl cluster-info\nkubectl get nodes\n```\n\n# Destroy the k8s cluster created\n```sh\nkops delete cluster test.domain.name --yes\n```\n\n## To know more about kops please \u003ca href=\"https://kops.sigs.k8s.io/\"\u003eclick here\u003c/a\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinav-26%2Faws-kops-clustersetup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhinav-26%2Faws-kops-clustersetup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinav-26%2Faws-kops-clustersetup/lists"}