{"id":25531260,"url":"https://github.com/guessi/etcd-cluster-on-k8s","last_synced_at":"2025-08-19T15:04:23.431Z","repository":{"id":142035174,"uuid":"544097203","full_name":"guessi/etcd-cluster-on-k8s","owner":"guessi","description":"Step by step tutorial for running etcd-cluster on Amazon EKS cluster","archived":false,"fork":false,"pushed_at":"2022-10-02T00:17:19.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-17T04:33:24.992Z","etag":null,"topics":["amazon-eks","eks","etcd","etcd-cluster","etcdv3","kubernetes","tutorial"],"latest_commit_sha":null,"homepage":"","language":null,"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/guessi.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":"2022-10-01T16:31:45.000Z","updated_at":"2022-10-01T16:36:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"974e3549-ee6b-4fcf-8f4e-7ee303678236","html_url":"https://github.com/guessi/etcd-cluster-on-k8s","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/guessi/etcd-cluster-on-k8s","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guessi%2Fetcd-cluster-on-k8s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guessi%2Fetcd-cluster-on-k8s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guessi%2Fetcd-cluster-on-k8s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guessi%2Fetcd-cluster-on-k8s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guessi","download_url":"https://codeload.github.com/guessi/etcd-cluster-on-k8s/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guessi%2Fetcd-cluster-on-k8s/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271173090,"owners_count":24711664,"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-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["amazon-eks","eks","etcd","etcd-cluster","etcdv3","kubernetes","tutorial"],"created_at":"2025-02-20T00:47:57.261Z","updated_at":"2025-08-19T15:04:23.423Z","avatar_url":"https://github.com/guessi.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Etcd-Cluster on Amazon EKS\n\nStep by step tutorial for running etcd-cluster on Amazon EKS cluster\n\n### Disclaimer\n\nPlease note this tutorial is for demonstration purpose only, please **_DO NOT_** blindly apply it to your production environments.\n\n## Prerequisites\n\n- [kubectl](https://kubernetes.io/docs/tasks/tools/) - The Kubernetes command-line tool\n- [helm](https://helm.sh/) - The Kubernetes Package Manage\n\n### Assumptions\n\n- All the tools required were setup properly\n- The cluster have at least 3 nodes (2 vCPU + 2G RAM per node)\n\n## Preparation\n\nFor demo purpose, here I will use minimized [values.yaml](values.yaml).\n\nand the instance type for the EKS nodes would be `t3.small (2 vCPU + 2G RAM)`.\n\n    $ kubectl get nodes # ...\n    NAME                              STATUS   INSTANCE-TYPE\n    ip-192-168-101-101.ec2.internal   Ready    t3.small\n    ip-192-168-101-102.ec2.internal   Ready    t3.small\n    ip-192-168-101-103.ec2.internal   Ready    t3.small\n\n## Let's get started\n\nFirst, we need to setup bitnami charts,\n\n    $ helm repo add bitnami https://charts.bitnami.com/bitnami\n    \"bitnami\" has been added to your repositories\n\nThen, make sure the \"bitnami\" chart is update-to-date,\n\n    $ helm repo update bitnami\n    Hang tight while we grab the latest from your chart repositories...\n    ...Successfully got an update from the \"bitnami\" chart repository\n    Update Complete. ⎈Happy Helming!⎈\n\nNow, we are ready to provision the etcd-cluster, it is suggested to review the content of [values.yaml](values.yaml) once again.\n\n    $ helm install my-etcd-cluster bitnami/etcd --values ./values.yaml\n\nThen, you should get the following output,\n\n```plaintext\nNAME: my-etcd-cluster\nLAST DEPLOYED: Sat Oct  1 23:55:07 2022\nNAMESPACE: default\nSTATUS: deployed\nREVISION: 1\nTEST SUITE: None\nNOTES:\nCHART NAME: etcd\nCHART VERSION: 8.5.5\nAPP VERSION: 3.5.5\n\n// ...\n```\n\nThat's all !!!\n\n## Frequently Asked Questions\n\n### Why my pods can't be started?\n\n:warning: If you are running with Amazon EKS 1.23 (or later), you will need to setup [Amazon EBS CSI driver](https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi.html) or it will failed like this :point_down:.\n\n    % kubectl version --client=false --output=json | jq .serverVersion\n    {\n        // ...\n        \"gitVersion\": \"v1.23.10-eks-15b7512\", # \u003c-------------\n        // ...\n    }\n\n    % kubectl get pods\n    NAME          READY   STATUS    RESTARTS      AGE\n    etcd-0        0/1     Running   1 (72s ago)   4m54s\n    etcd-1        0/1     Running   1 (67s ago)   4m54s\n    etcd-2        0/1     Running   1 (75s ago)   4m54s\n\n### How to access to the etcd-cluster?\n\n    $ export ETCD_ROOT_PASSWORD=$(kubectl get secret --namespace default etcd -o jsonpath=\"{.data.etcd-root-password}\" | base64 -d)\n\n    $ kubectl run etcd-client \\\n        --restart='Never' \\\n        --image docker.io/bitnami/etcd:3.5.5-debian-11-r1 \\\n        --env ROOT_PASSWORD=${ETCD_ROOT_PASSWORD} \\\n        --env ETCDCTL_ENDPOINTS=\"etcd.default.svc.cluster.local:2379\" \\\n        --namespace default \\\n        --command -- sleep infinity\n\n    $ kubectl exec --namespace default -it etcd-client -- /bin/bash -c \"etcdctl --user root:\\$ROOT_PASSWORD put /message Hello\"\n    OK\n\n    $ kubectl exec --namespace default -it etcd-client -- /bin/bash -c \"etcdctl --user root:\\$ROOT_PASSWORD get /message\"\n    /message\n    Hello\n\n### Is it safe to decrease pods count for maintenance?\n\nYes, if you scale down Pods properly.\n\n    $ kubectl scale statefulsets etcd --replicas 2\n    statefulset.apps/etcd scaled\n\n    $ kubectl get pods\n    NAME          READY   STATUS    RESTARTS   AGE\n    etcd-0        1/1     Running   0          8m3s\n    etcd-1        1/1     Running   0          8m3s # \u003c------------- etcd-2 is gone.\n    etcd-client   1/1     Running   0          5m44s\n\n    $ kubectl exec --namespace default -it etcd-client -- /bin/bash -c \"etcdctl --user root:\\$ROOT_PASSWORD get /message\"\n    /message\n    Hello # \u003c------------- cluster still alive!\n\n    $ kubectl scale statefulsets etcd --replicas 3\n    statefulset.apps/etcd scaled\n\n    $ kubectl get pods\n    NAME          READY   STATUS    RESTARTS   AGE\n    etcd-0        1/1     Running   0          10m\n    etcd-1        1/1     Running   0          10m\n    etcd-2        1/1     Running   0          80s # \u003c------------- etcd-2 back online after liveness probe passed.\n    etcd-client   1/1     Running   0          8m10s\n\n    $ kubectl exec --namespace default -it etcd-client -- /bin/bash -c \"etcdctl --user root:\\$ROOT_PASSWORD get /message\"\n    /message\n    Hello # \u003c------------- cluster still alive!\n\n## Cleanup\n\n:warning: **_WARNING: all data will be removed permanently, and there's no way back, unrecoverable_** :warning:\n\n    $ helm -n default uninstall my-etcd-cluster\n    $ kubectl -n default delete pods etcd-client\n    $ kubectl -n default delete persistentvolumeclaim/data-etcd-0\n    $ kubectl -n default delete persistentvolumeclaim/data-etcd-1\n    $ kubectl -n default delete persistentvolumeclaim/data-etcd-2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguessi%2Fetcd-cluster-on-k8s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguessi%2Fetcd-cluster-on-k8s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguessi%2Fetcd-cluster-on-k8s/lists"}