{"id":13522190,"url":"https://github.com/weibeld/kubectl-ctx","last_synced_at":"2025-06-15T19:34:47.273Z","repository":{"id":59977752,"uuid":"169791572","full_name":"weibeld/kubectl-ctx","owner":"weibeld","description":"A kubectl plugin for interactively changing the kubeconfig context","archived":false,"fork":false,"pushed_at":"2022-12-29T11:39:18.000Z","size":132,"stargazers_count":42,"open_issues_count":0,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T07:56:54.711Z","etag":null,"topics":["kubectl","kubectl-plugins","kubernetes"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/weibeld.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}},"created_at":"2019-02-08T20:02:00.000Z","updated_at":"2025-02-02T03:46:24.000Z","dependencies_parsed_at":"2023-01-31T08:45:58.670Z","dependency_job_id":null,"html_url":"https://github.com/weibeld/kubectl-ctx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weibeld%2Fkubectl-ctx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weibeld%2Fkubectl-ctx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weibeld%2Fkubectl-ctx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weibeld%2Fkubectl-ctx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weibeld","download_url":"https://codeload.github.com/weibeld/kubectl-ctx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055105,"owners_count":21040122,"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":["kubectl","kubectl-plugins","kubernetes"],"created_at":"2024-08-01T06:00:43.828Z","updated_at":"2025-04-09T14:31:24.954Z","avatar_url":"https://github.com/weibeld.png","language":"Shell","funding_links":[],"categories":["kubectl Plugins"],"sub_categories":["Installing plugins via awesome-kubectl-plugins"],"readme":"# kubectl ctx\n\nA kubectl [plugin](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/) for interactively changing your *kubeconfig* context.\n\n![Demo](img/demo.gif)\n\nThis makes it easier to work with multiple clusters from the same machine.\n\nAlso see [kubectl-ns](https://github.com/weibeld/kubectl-ns) for switching between namespaces.\n\n## Installation\n\nTo install the plugin, download the `kubectl-ctx` file and save it in any directory that is in your `PATH`:\n\n~~~bash\ncurl -O https://raw.githubusercontent.com/weibeld/kubectl-ctx/master/kubectl-ctx\n~~~\n\nThen, make the `kubectl-ctx` file executable:\n\n~~~bash\nchmod +x kubectl-ctx\n~~~\n\nNow, you can verify that the plugin is correctly installed by running the following command:\n\n~~~bash\nkubectl plugin list\n~~~~\n\nThis lists all the plugins that `kubectl` detected, and the `kubectl-ctx` plugin should now be listed there.\n\nTo uninstall the plugin, simply delete the `kubectl-ctx` file.\n\n## Usage\n\nChange the current context:\n\n~~~bash\nkubectl ctx\n~~~\n\nList all contexts:\n\n~~~bash\nkubectl ctx -l\n~~~\n\n## How It Works\n\nWhen you run `kubectl ctx`, the plugin changes the `current-context` element of your [*kubeconfig*](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) configuration:\n\n![How it works](img/how-it-works.png)\n\nNote that this includes a physical change to one of your *kubeconfig* files (the default *kubeconfig* file is `~/.kube/config`, but you can have multiple *kubeconfig* files by by listing them in the [`KUBECONFIG`](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#the-kubeconfig-environment-variable) environment variable).\n\nWhen you run `kubectl ctx -l`, the plugin displays the names of all the contexts in your *kubeconfig* configuration.\n\n## Dependencies\n\nThe plugin depends on the [fzf](https://github.com/junegunn/fzf) command being available on your system.\n\nYou can install fzf as follows:\n\n- Homebrew (macOS) and Linuxbrew (Linux):\n    ~~~bash\n    brew install fzf\n    ~~~\n- From source (macOS and Linux):\n    ~~~bash\n    git clone https://github.com/junegunn/fzf.git ~/.fzf\n    ~/.fzf/install\n    ~~~\n- For further installation options, see [here](https://github.com/junegunn/fzf#installation)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweibeld%2Fkubectl-ctx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweibeld%2Fkubectl-ctx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweibeld%2Fkubectl-ctx/lists"}