{"id":25668085,"url":"https://github.com/tty47/kubeselect","last_synced_at":"2025-11-17T16:04:37.826Z","repository":{"id":107119258,"uuid":"220702045","full_name":"tty47/kubeselect","owner":"tty47","description":"Switch Kubernetes contexts made easy!","archived":false,"fork":false,"pushed_at":"2019-09-01T13:36:51.000Z","size":121,"stargazers_count":1,"open_issues_count":0,"forks_count":18,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-22T03:33:26.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"fatliverfreddy/kubeselect","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tty47.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}},"created_at":"2019-11-09T20:48:38.000Z","updated_at":"2024-10-06T17:12:23.000Z","dependencies_parsed_at":"2024-12-22T06:15:34.084Z","dependency_job_id":null,"html_url":"https://github.com/tty47/kubeselect","commit_stats":null,"previous_names":["tty47/kubeselect"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tty47%2Fkubeselect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tty47%2Fkubeselect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tty47%2Fkubeselect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tty47%2Fkubeselect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tty47","download_url":"https://codeload.github.com/tty47/kubeselect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240460683,"owners_count":19804946,"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":[],"created_at":"2025-02-24T10:28:32.582Z","updated_at":"2025-11-17T16:04:37.820Z","avatar_url":"https://github.com/tty47.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# kubeselect\n\n\u003cimg src=\"./kubeselect.gif\" width=\"928px\" height=\"588px\" /\u003e\n\n## Why?\n\nWorking with multiple K8S contexts for many different clients, I'm always annoyed by having to remember context names.\nUsing `kubectl config get-clusters` then having to type is too much work.\nEven searching my shell history gets tidious when I have so many clusters to manage and it's hard to keep track of names,\nespecially with super longs ones auto-generated by AWS etc.\n\nThis small helper util helps select an available Kubernetes context using the arrow keys\nusing one simple command rather than two seperate kubectl commands to first show, then select contexts.\n\nIt uses the mapfile shim found [here](https://github.com/dosentmatter/bash-mapfile-shim).\nwhich itself uses [upvars](http://fvue.nl/wiki/Bash:_Passing_variables_by_reference) by Freddy Vulto.\nThese are only needed for bash versions \u003c 4, otherwise the native functions are used.\n\nFinally, the small select_option function was found on [this StackOverflow thread](https://stackoverflow.com/questions/11426529/reading-output-of-a-command-into-an-array-in-bash).\nI included all source code I used as is in the bash script itself.\n\nTested on MacOS, YMMV.\n\nP.S.:\nThe incredibly useful theme I'm using in the GIF above is [bobthefish](https://github.com/oh-my-fish/theme-bobthefish) on the mighty [fish shell](https://fishshell.com/).\nThe part of which that shows the current Kubernetes context is originally also my contribution.\nI consider this a MUST when managing multiple clusters.\nThe theme itself can be installed using [oh-my-fish](https://github.com/oh-my-fish/oh-my-fish).\n\n## Installation\n\n`$ sudo cp kubeselect /usr/local/bin`\n\n## Usage\n\n`$ kubeselect`\n\nThat's it, hope somebody finds it useful like I did. Star if you do!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftty47%2Fkubeselect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftty47%2Fkubeselect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftty47%2Fkubeselect/lists"}