{"id":24753976,"url":"https://github.com/poneding/ktx","last_synced_at":"2025-03-23T05:13:04.667Z","repository":{"id":274198251,"uuid":"922207675","full_name":"poneding/ktx","owner":"poneding","description":"ktx is a tool to manage kubernetes contexts","archived":false,"fork":false,"pushed_at":"2025-02-28T00:59:30.000Z","size":4243,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T09:14:21.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poneding.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":"2025-01-25T15:54:03.000Z","updated_at":"2025-02-28T00:59:33.000Z","dependencies_parsed_at":"2025-02-18T09:21:04.001Z","dependency_job_id":"41ca5c3f-9b47-49a6-9fbd-4a56b8cfdb38","html_url":"https://github.com/poneding/ktx","commit_stats":null,"previous_names":["poneding/ktx"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poneding%2Fktx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poneding%2Fktx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poneding%2Fktx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poneding%2Fktx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poneding","download_url":"https://codeload.github.com/poneding/ktx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245056906,"owners_count":20553856,"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-01-28T11:37:55.957Z","updated_at":"2025-03-23T05:13:04.660Z","avatar_url":"https://github.com/poneding.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ktx\n\nEnglish | [简体中文](README_zh-CN.md)\n\nktx is an easy-to-use command line tool for kubernetes multi-cluster context management.\n\n![demo](docs/images/demo.gif)\n\n## Installation\n\n- Install with `go install`\n\n```bash\ngo install -u github.com/poneding/ktx@latest\n```\n\n- Install from binary\n\nFor MacOS or Linux:\n\n```bash\ncurl -sSL https://github.com/poneding/ktx/raw/master/install.sh | sh\n```\n\nFor Windows:\n\nDownload the lastest executable from [Releases](https://github.com/poneding/ktx/releases/latest) and add it to the PATH.\n\n## Usage\n\n![usage](docs/images/usage.png)\n\n1. Add cluster context\n\n```bash\nktx add -f .kube/kind-cluster-01\nktx add -f .kube/kind-cluster-02\n```\n\n2. List cluster contexts\n\n```bash\nktx list\n```\n\nAlias: `ktx ls`\n\n3. Switch cluster context\n\n```bash\n# Switch contexts\nktx\n\n# Switch to specified cluster context\nktx switch kind-cluster-01\n\n# Interactive switch\nktx switch\n```\n\nAlias: `ktx s`\n\n4. Rename cluster context\n\n```bash\n# Rename specified cluster context\nktx rename kind-cluster-01\n\n# Interactive rename\nktx rename\n```\n\n5. Remove cluster context\n\n```bash\n# Remove specified cluster context\nktx remove kind-cluster-01\n\n# Interactive remove\nktx remove\n```\n\nAlias: `ktx rm`\n\n6. Export cluster context\n\n```bash\nktx export kind-cluster-01 -f .kube/export-01\n```\n\n7. Generate kubeconfig from ServiceAccount\n\n```bash\nktx generate --service-account default -f .kube/my-gen-config\n```\n\nAlias: `ktx gen`\n\n8. Set namespace\n\n```bash\nktx set-namespace --namespace default\n```\n\n9. Set Server address\n\n```bash\nktx set-server --server https://api.k8s.local:6443\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fponeding%2Fktx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fponeding%2Fktx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fponeding%2Fktx/lists"}