{"id":21322115,"url":"https://github.com/polyrabbit/etcdfs","last_synced_at":"2025-07-12T05:30:49.885Z","repository":{"id":45450522,"uuid":"283816950","full_name":"polyrabbit/etcdfs","owner":"polyrabbit","description":":file_folder: Mount etcd into a local directory","archived":false,"fork":false,"pushed_at":"2023-02-25T06:24:09.000Z","size":30,"stargazers_count":82,"open_issues_count":2,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T14:36:17.845Z","etag":null,"topics":["etcd","etcd-client","filesystem","fuse"],"latest_commit_sha":null,"homepage":"","language":"Go","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/polyrabbit.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":"2020-07-30T15:53:18.000Z","updated_at":"2025-02-11T05:36:52.000Z","dependencies_parsed_at":"2024-06-19T01:53:58.418Z","dependency_job_id":"6a55b5c4-12b7-4747-b7b3-b08814a9fa09","html_url":"https://github.com/polyrabbit/etcdfs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/polyrabbit/etcdfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyrabbit%2Fetcdfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyrabbit%2Fetcdfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyrabbit%2Fetcdfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyrabbit%2Fetcdfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polyrabbit","download_url":"https://codeload.github.com/polyrabbit/etcdfs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyrabbit%2Fetcdfs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264941564,"owners_count":23686511,"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":["etcd","etcd-client","filesystem","fuse"],"created_at":"2024-11-21T20:13:22.622Z","updated_at":"2025-07-12T05:30:49.656Z","avatar_url":"https://github.com/polyrabbit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# etcdfs - A FUSE filesystem backed by etcd\n\n[![Tests](https://github.com/polyrabbit/etcdfs/workflows/Tests/badge.svg)](https://github.com/polyrabbit/etcdfs/actions)\n[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/polyrabbit/my-token/pulls)\n[![Go Report Card](https://goreportcard.com/badge/github.com/polyrabbit/etcdfs)](https://goreportcard.com/report/github.com/polyrabbit/etcdfs)\n\n[中文简介](https://blog.betacat.io/post/2020/08/how-to-mount-etcd-as-a-filesystem/)\n\nTired of typing `etcdctl`? why not mount it to local filesystem and open in your favorite editors?\n\n## Example\n\nWondering how Kubernetes organizes data in etcd? After mounting it locally, we can use [VS Code](https://code.visualstudio.com/) to get the whole picture:\n\n![etcd-of-a-kubernetes](https://user-images.githubusercontent.com/2657334/89164446-b6b92e00-d5a9-11ea-93b9-218072ce73ff.png)\n\n_Hint: steps to mount Kubernetes etcd locally:_\n\n```bash\n$ # scp etcd certificates to a local directory (keep them carefully)\n$ scp -r \u003ckubernetes-master-ip\u003e:/etc/kubernetes/pki/etcd .\n$ # mount to a local directory\n$ etcdfs --endpoints=\u003ckubernetes-master-ip\u003e:2379 --cacert etcd/ca.crt --key etcd/server.key --cert etcd/server.crt mnt\n$ # open it in VS code\n$ code mnt\n```\n\n## Installation\n\n#### Homebrew\n\n```bash\n# WIP\n```\n\n#### `curl | bash` style downloads to `/usr/local/bin`\n```bash\n$ curl -sfL https://raw.githubusercontent.com/polyrabbit/etcdfs/master/.godownloader.sh | bash -s -- -d -b /usr/local/bin\n```\n\n#### Using [Go](https://golang.org/)\n```bash\n$ go get -u github.com/polyrabbit/etcdfs\n```\n\n## Usage\n\n```bash\n$ etcdfs\nMount etcd to local file system - find help/update from https://github.com/polyrabbit/etcdfs\n\nUsage:\n  etcdfs [mount-point] [flags]\n\nFlags:\n      --endpoints strings       etcd endpoints (default [127.0.0.1:2379])\n      --dial-timeout duration   dial timeout for client connections (default 2s)\n      --read-timeout duration   timeout for reading and writing to etcd (default 3s)\n  -v, --verbose                 verbose output\n      --enable-pprof            enable runtime profiling data via HTTP server. Address is at \"http://localhost:9327/debug/pprof\"\n      --cert string             identify secure client using this TLS certificate file\n      --key string              identify secure client using this TLS key file\n      --cacert string           verify certificates of TLS-enabled secure servers using this CA bundle\n      --mount-options strings   options are passed as -o string to fusermount (default [nonempty])\n  -h, --help                    help for etcdfs\n```\n\n_Notice: `etcdfs` has a very similar CLI syntax to `etcdctl`._\n\n## Limitations\n\n* Etcdfs depends on the [FUSE](https://en.wikipedia.org/wiki/Filesystem_in_Userspace) kernel module which only supports Linux and macOS(?). It needs to be installed first:\n    * Linux: `yum/apt-get install -y fuse`\n    * macOS: install [OSXFUSE](https://osxfuse.github.io/)\n* Keys in etcd should have a hierarchical structure to fit the filesystem tree model. And currently the only supported hierarchy separator is `/` (the same as *nix), more will be supported in the future. \n* Currently only etcd v3 is supported.\n\n## Supported Operations\n\nMost commonly used POSIX operations are supported:\n\n* Readdir\n* Lookup\n* Getattr\n* Open\n* Read\n* Write\n* Create\n* Flush\n* Fsync\n* Unlink\n* Setattr\n\n## TODO\n\n- [x] ~~When building a directory, all keys belonging to that directory can be skipped~~\n- [ ] Support hierarchy separators other than `/` in etcd\n- [ ] Watch for file/directory changes\n\n## Credits\n\n * Inspired by [rssfs](https://github.com/dertuxmalwieder/rssfs)\n * Based on [go-fuse](https://github.com/hanwen/go-fuse) binding\n\n## License\n\nThe MIT License (MIT) - see [LICENSE.md](https://github.com/polyrabbit/etcdfs/blob/master/LICENSE) for more details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyrabbit%2Fetcdfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolyrabbit%2Fetcdfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyrabbit%2Fetcdfs/lists"}