{"id":28537491,"url":"https://github.com/serkanh/aws-eks","last_synced_at":"2026-04-29T09:31:21.525Z","repository":{"id":141496191,"uuid":"172765882","full_name":"serkanh/aws-eks","owner":"serkanh","description":null,"archived":false,"fork":false,"pushed_at":"2019-02-26T18:23:47.000Z","size":106,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-08T07:45:00.232Z","etag":null,"topics":["aws","eks","kubernetes"],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serkanh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2019-02-26T18:23:23.000Z","updated_at":"2023-11-06T19:37:13.000Z","dependencies_parsed_at":"2023-07-07T21:16:46.951Z","dependency_job_id":null,"html_url":"https://github.com/serkanh/aws-eks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/serkanh/aws-eks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serkanh%2Faws-eks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serkanh%2Faws-eks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serkanh%2Faws-eks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serkanh%2Faws-eks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serkanh","download_url":"https://codeload.github.com/serkanh/aws-eks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serkanh%2Faws-eks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32419768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","eks","kubernetes"],"created_at":"2025-06-09T18:10:04.338Z","updated_at":"2026-04-29T09:31:21.518Z","avatar_url":"https://github.com/serkanh.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EKS Getting Started Guide Configuration\n\nThis is the full configuration from https://www.terraform.io/docs/providers/aws/guides/eks-getting-started.html\n\nSee that guide for additional information.\n\nNOTE: This full configuration utilizes the [Terraform http provider](https://www.terraform.io/docs/providers/http/index.html) to call out to icanhazip.com to determine your local workstation external IP for easily configuring EC2 Security Group access to the Kubernetes master servers. Feel free to replace this as necessary.\n\n# Create the EKS cluster via Terraform\n\n1. `terraform apply`\n2. Run `terraform output config_map_aws_auth \u003e config_map_aws_auth.yaml` and save the configuration into a file, e.g. config_map_aws_auth.yaml\n\n```➜  aws-eks git:(master) ✗ terraform output config_map_aws_auth\n\n\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: aws-auth\n  namespace: kube-system\ndata:\n  mapRoles: |\n    - rolearn: arn:aws:iam::131778002569:role/terraform-eks-demo-node\n      username: system:node:{{EC2PrivateDNSName}}\n      groups:\n        - system:bootstrappers\n        - system:nodes\n```\n\n3. Than apply it to the cluster which allows worker nodes to be able to join the cluster\n\n```\n➜  aws-eks git:(master) ✗ kubectl apply -f config_map_aws_auth.yaml\nconfigmap \"aws-auth\" created\n```\n\n4. Verify nodes are joining to the cluster.\n\n```\nkubectl get nodes --watch\n```\n\n# Kubectl setup on osx\n\n1. Check the version of your kubectl\u003cbr /\u003e\n   `kubectl version --short --client`\n2. Get the recommended version of kubectl if you have not already. [docs](https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html)\u003cbr /\u003e\n   `curl -o kubectl https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-07-26/bin/darwin/amd64/kubectl`\n3. Get the iam authenticator\u003cbr /\u003e\n   `curl -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-07-26/bin/darwin/amd64/aws-iam-authenticator`\n4. Update eks kubeconfig\n   `aws eks update-kubeconfig --name terraform-eks-demo --region=us-west-2`\n\n```\n➜  .kube git:(master) aws eks update-kubeconfig --name terraform-eks-demo --region=us-west-2\nAdded new context arn:aws:eks:us-west-2:131778002569:cluster/terraform-eks-demo to /Users/shaytac/.kube/config\n\nmodule 'distutils' has no attribute 'spawn'\n```\n\n5. Check to see if you can issue commands against cluster. If you receive username/password prompt that is most likely due to [outdated kubectl version](https://stackoverflow.com/questions/51334054/setting-up-aws-eks-dont-know-username-and-password-for-config)\n\n```\n➜ kubectl get svc                                                                                                                          │\nNAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE                                                                                              │\nkubernetes   ClusterIP   172.20.0.1   \u003cnone\u003e        443/TCP   52m\n\n```\n\n6. [Managing Users or IAM Roles for your Cluster](https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html)\n\n7. Deploy the Kubernetes dashboard to your cluster:\n\n```\nkubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml\n```\n\n8. Deploy Hipster\n\n```\nkubectl apply -f https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/influxdb/heapster.yaml\n```\n\n9. Deploy the influxdb backend for heapster to your cluster:\n\n```\nkubectl apply -f https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/influxdb/influxdb.yaml\n```\n\n10. Create the heapster cluster role binding for the dashboard:\n\n```\nkubectl apply -f https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/rbac/heapster-rbac.yaml\n\n```\n\n11. Create an eks admin account [file](./eks-admin-account.yml]\n\n```\nkubectl apply -f eks-admin-service-account.yml\n```\n\n12. Bind the admin role to eks admin account\n\n```\nkubectl apply -f eks-admin-cluster-role-binding.yml\n```\n\n13. Now using the `eks-admin` account connect to dashbard.\n\n```\nkubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep eks-admin | awk '{print $1}')\n```\n\n14. Start the kubectl proxy\n\n```\n➜  aws-eks git:(master) ✗ kubectl proxy\nStarting to serve on 127.0.0.1:8001\n```\n\n15. Connect to dashboard.\n\n```\nkubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep eks-admin | awk '{print $1}')\n```\n\nOutput\n\n```\nName:         eks-admin-token-b5zv4\nNamespace:    kube-system\nLabels:       \u003cnone\u003e\nAnnotations:  kubernetes.io/service-account.name=eks-admin\n              kubernetes.io/service-account.uid=bcfe66ac-39be-11e8-97e8-026dce96b6e8\n\nType:  kubernetes.io/service-account-token\n\nData\n====\nca.crt:     1025 bytes\nnamespace:  11 bytes\ntoken:      ------\u003e \u003cauthentication_token\u003e \u003c------\n```\n\n```\n➜  ~ kubectl --namespace kube-system get services\nNAME                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)         AGE\nkube-dns               ClusterIP   172.20.0.10      \u003cnone\u003e        53/UDP,53/TCP   1h\nkubernetes-dashboard   ClusterIP   172.20.175.241   \u003cnone\u003e        443/TCP         22m\n```\n\n# Installing Helm on Kubernetes cluster\n\n1. `brew install helm`\n2. Make sure to have current context set to desired cluster\n\n```\n➜  ~ kubectl config current-context\narn:aws:eks:us-west-2:131778002569:cluster/terraform-eks-demo\n```\n\n3. Execute `helm init`\n\nIn case of following error\n\n```\n➜  ~ helm install --name my-release stable/nginx-ingress\nError: release my-release failed: namespaces \"default\" is forbidden: User \"system:serviceaccount:kube-system:default\" cannot get namespaces in the namespace \"default\"\n```\n\n# Installing Nginx ingress\n\nBased on [this guide](https://github.com/nginxinc/kubernetes-ingress/blob/master/docs/installation.md)\n\n1.\n\n```\n➜  nginx-ingress git:(master) ✗ cat ns-and-sa.yaml\napiVersion: v1\nkind: Namespace\nmetadata:\n  name: nginx-ingress\n---\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: nginx-ingress\n  namespace: nginx-ingress%\n\n➜  aws-eks git:(master) ✗ kubectl apply -f nginx-ingress/ns-and-sa.yaml\nnamespace \"nginx-ingress\" created\nserviceaccount \"nginx-ingress\" created\n```\n\n2.\n\n```\n➜  aws-eks git:(master) ✗ kubectl apply -f ./nginx-ingress/default-server-secret.yaml\nsecret \"default-server-secret\" created\n```\n\n3.\n\n```\nkubectl apply -f common/nginx-config.yaml\n```\n\n4. Create an nginx ingress deployment\n\n```\n➜  nginx-ingress git:(master) ✗ kubectl apply -f ./deployments/nginx-ingress.yaml\ndeployment.extensions \"nginx-ingress\" created\n```\n\n5. Create a DaemonSet\n\n```\n➜  nginx-ingress git:(master) ✗ kubectl apply -f daemon-set/nginx-ingress.yaml\ndaemonset.extensions \"nginx-ingress\" created\n\n```\n\n6. Apply Rbac\n\n```\n➜  nginx-ingress git:(master) ✗ kubectl apply -f rbac.yaml\nclusterrole.rbac.authorization.k8s.io \"nginx-ingress\" created\nclusterrolebinding.rbac.authorization.k8s.io \"nginx-ingress\" created\n\n```\n\nIf this is not setup correctly pods will be crashing with the following error:\n\n```\n➜  nginx-ingress git:(master) ✗ kubectl --namespace=nginx-ingress logs -p nginx-ingress-6gmkp\nI0210 03:25:38.390831       1 main.go:118] Starting NGINX Ingress controller Version=edge GitCommit=9a21a40b\nF0210 03:25:38.399951       1 main.go:177] Error when getting nginx-ingress/default-server-secret: secrets \"default-server-secret\" is forbidden: User \"system:serviceaccount:nginx-ingress:nginx-ingress\" cannot get secrets in the namespace \"nginx-ingress\"\n```\n\n7. Create a service with the Type LoadBalancer\n\n```\n➜  nginx-ingress git:(master) ✗ kubectl apply -f service/loadbalancer-aws-elb.yaml\nservice \"nginx-ingress\" created\n\n```\n\n**Optional demo app deployment with ingress based on [nginx docs](https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/complete-example)**\n\n8. Create `coffee` and `tea` services that we will be using to test the ingress controller deployment\n\n```\nkubectl create -f cafe.yaml\n```\n\n9. Create ingress resource for demo-app\n\n```\n➜  aws-eks git:(master) ✗ kubectl create -f cafe-ingress.yaml\ningress.extensions \"cafe-ingress\" created\n```\n\n10. To test set `IC_HTTPS_PORT` and `IC_IP`\n\n```\n➜  demo-app git:(master) ✗ nslookup your-elb-1934633290.us-west-2.elb.amazonaws.com\nServer:         1.1.1.1\nAddress:        1.1.1.1#53\n\nNon-authoritative answer:\nName:   your-elb-1934633290.us-west-2.elb.amazonaws.com\nAddress: 34.218.166.164\nName:   your-elb-1934633290.us-west-2.elb.amazonaws.com\nAddress: 34.211.105.237\n\n➜  demo-app git:(master) ✗ export IC_HTTPS_PORT=443\n\n➜  demo-app git:(master) ✗ export IC_IP=34.218.166.164\n➜  demo-app git:(master) curl --resolve cafe.example.com:$IC_HTTPS_PORT:$IC_IP https://cafe.example.com:$IC_HTTPS_PORT/coffee --insecure\n\nServer address: 10.0.1.204:80\nServer name: coffee-6c47b9cb9c-z67wc\nDate: 10/Feb/2019:18:16:48 +0000\nURI: /coffee\nRequest ID: f11da1407f0567199da637a0db3c9ca8\n\n➜  demo-app git:(master) curl --resolve cafe.example.com:$IC_HTTPS_PORT:$IC_IP https://cafe.example.com:$IC_HTTPS_PORT/tea --insecure\n\nServer address: 10.0.0.186:80\nServer name: tea-58d4697745-l5xmt\nDate: 10/Feb/2019:18:17:16 +0000\nURI: /tea\nRequest ID: f4805c41008b3300c3c78fbcd35bf1e5\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserkanh%2Faws-eks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserkanh%2Faws-eks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserkanh%2Faws-eks/lists"}