{"id":21221404,"url":"https://github.com/nearmap/kubefs","last_synced_at":"2025-07-10T12:32:00.264Z","repository":{"id":46671203,"uuid":"371854630","full_name":"nearmap/kubefs","owner":"nearmap","description":"User friendly kubernetes tools to make your clusters less mysterious and more accessible","archived":false,"fork":false,"pushed_at":"2022-06-01T06:09:49.000Z","size":543,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-02T04:56:15.413Z","etag":null,"topics":["filesystem","fuse","hackday","k8s","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Python","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/nearmap.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}},"created_at":"2021-05-29T01:28:15.000Z","updated_at":"2021-11-23T23:04:34.000Z","dependencies_parsed_at":"2022-09-04T10:31:39.617Z","dependency_job_id":null,"html_url":"https://github.com/nearmap/kubefs","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nearmap%2Fkubefs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nearmap%2Fkubefs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nearmap%2Fkubefs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nearmap%2Fkubefs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nearmap","download_url":"https://codeload.github.com/nearmap/kubefs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225638729,"owners_count":17500620,"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":["filesystem","fuse","hackday","k8s","kubernetes"],"created_at":"2024-11-20T22:27:32.419Z","updated_at":"2024-11-20T22:27:32.965Z","avatar_url":"https://github.com/nearmap.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# User friendly kubernetes tools\n\nThis project is a collection of tools created to demystify your kubernetes\nclusters and make them more accessible to non-expert users.\n\n* `kubefs` is a filesystem that allows you to browse the kubernetes objects in\n  your cluster in a familiar way, as files and directories.\n* `podview` is a terminal program which gives you a real time view of pods that\n  interest you, across clusters. You can use it to watch code deployments in\n  real time, or check up on the health of your workloads.\n\n\n\n## kubefs - a fuse filesystem for browsing clusters\n\n`kubefs` is a **read-only** filesystem that runs in user space (you don't need\nto be `root` to mount it) that allows you to browse objects in your Kubernetes\nclusters.\n\n![kubefs screenshot](docs/assets/kubefs-shot.png)\n\nIt loads your kube config(s) from `$KUBECONFIG` or `~/.kube` and uses that to\npresent a top level view for you to navigate. The modification timestamps of the\nfiles and directories reflect the `creationTimestamp` of the kube objects\nthemselves.\n\nBehind the scenes, `kubefs` makes requests to the k8s API server to fetch all\nthese objects and populate the filesystem. This can be slow, so directory\nentries are cached.\n\n\n\n## podview - a real time dashboard for pods\n\n`podview` is a curses based terminal program which gives you a real time view of the\npods that you want to see.\n\nIt loads your kube config(s) from `$KUBECONFIG` or `~/.kube` and uses that to\ndetect all your clusters. You can then filter on:\n\n* cluster name using `-c` / `--cluster`\n* namespace name using `-n` / `--namespace`\n* pod name using `-p` / `--pod`\n\nA very common case is watching the state of pods for a particular\nworkload/service across all your clusters:\n\n```bash\n$ ./pv --pod 'prom*'\n```\n\n![podview screenshot](docs/assets/podview-shot.png)\n\nOn startup `podview` first lists all the pods matching your filter, and then\nproceeds to watch them for updates.\n\nPods are listed per cluster, and sorted by `creationTimestamp` so you will see\nthe oldest pods at the top.\n\nKeyboard controls:\n\n* Arrow keys to scroll horizontally or vertically by one character.\n* PageUp/PageDown to scroll vertically by half a page.\n\n\n\n## Getting started\n\nRequirements:\n​\n* Python 3.8 or later.\n* A working kube config (make sure `kubectl` works).\n* Additional dependencies for `kubefs` (not required for `podview`):\n  * `fuse` (available on Linux and [Mac](https://osxfuse.github.io/))\n  * Somewhere to mount the filesystem. `~/kubeview` is the suggested mount\n    point, but you can use any location you like.\n\n\n### Ubuntu\n\n\n#### System packages\n\nLet's first check the version of your system Python:\n\n```bash\n$ python3 -V\nPython 3.8.10\n```\n\nInstall the fuse packages and the python-venv package matching your installed\nversion:\n\n```bash\n$ sudo apt install fuse libfuse2 python3.8-venv\n```\n\n\n### Project setup (the scripted way)\n\nClone the repository:\n\n```bash\n$ git clone https://github.com/nearmap/kubefs\n$ cd kubefs\n```\n\nThese scripts automate the manual setup below:\n\n```bash\n# kubefs\n$ mkdir -p ~/kubeview\n$ ./kfs ~/kubeview\n\n# podview\n$ ./pv\n```\n\nThey basically manage the virtual environment for you, so *they have to be run\noutside of the virtual environment*.\n\nThe scripts assume that you either:\n- Don't have a virtual environment in `.ve/` at all (it will setup it up for\n  you), or\n- You have a fully populated virtual environment in `.ve/` (it will assume it's\n  up to date to avoid running `pip install` every time).\n\nIf your virtual environment isn't working try removing it by doing `rm -rf .ve`\nand re-running the scripts. See also the `Troubleshooting` section below.\n\n\n### Project setup (the manual way)\n\nClone the repository:\n\n```bash\n$ git clone https://github.com/nearmap/kubefs\n$ cd kubefs\n```\n\nCreate the virtual environment by doing:\n\n```bash\n$ python3 -m venv .ve\n```\n\nActivate it by doing:\n\n```bash\n$ . .ve/bin/activate\n(.ve) $\n```\n\nOnce you've activated the virtual environment install the dependencies into it:\n\n```bash\n(.ve) $ pip install -r requirements.txt\n```\n\nFinally, make sure kubefs and podview can be started without errors:\n\n```bash\n# kubefs\n(.ve) $ mkdir -p ~/kubeview\n(.ve) $ bin/kubefs ~/kubeview\n\n# podview\n(.ve) $ bin/podview\n```\n\n\n### Troubleshooting\n\n**When running `kubefs` or `podview` I get `ModuleNotFoundError: No module named\n'fuse'`**\n\nYour virtual environment is missing one or more dependencies. Try re-creating\nit and re-installing the dependencies. See the `Project setup` steps above.\n\n**While creating/installing dependencies into a virtual environment I see\nerrors in red, something about `Failed building wheel`.**\n\nThese are not fatal errors and you can ignore them.\n\n**When running `kubefs` or `podview` I get `FileNotFoundError: [Error 2] No such\nfile or directory: '/home/user/.kube'`.**\n\nYour kube config files could not be detected. (Does `kubectl` work?)\n\nIf you have `$KUBECONFIG` set make sure it's pointing at one or more valid kube\nconfig files, eg.\n`KUBECONFIG=/home/user/.kube/cluster1:/home/user/.kube/cluster2`.\n\nOtherwise, make sure that your `~/.kube` directory contains at least one valid\nkube config file.\n\n**Using logs to troubleshoot problems that occur at runtime.**\n\n`kubefs` runs in the foreground and logs to stdout/stderr.\n\n`podview` runs a curses ui in the foreground. It logs to `var/log/podview.log`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnearmap%2Fkubefs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnearmap%2Fkubefs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnearmap%2Fkubefs/lists"}