{"id":18028000,"url":"https://github.com/lfbear/k","last_synced_at":"2025-03-27T02:31:11.301Z","repository":{"id":48981258,"uuid":"329502133","full_name":"lfbear/k","owner":"lfbear","description":"A shell tool for kubectl contexts switch quickly, multi-cluster ","archived":false,"fork":false,"pushed_at":"2021-07-02T10:17:11.000Z","size":170,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T22:05:29.017Z","etag":null,"topics":["kebectl","kubernetes","multi-cluster","shell-script","use-context"],"latest_commit_sha":null,"homepage":"","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/lfbear.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":"2021-01-14T03:58:35.000Z","updated_at":"2024-08-27T02:32:05.000Z","dependencies_parsed_at":"2022-08-24T15:41:51.805Z","dependency_job_id":null,"html_url":"https://github.com/lfbear/k","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/lfbear%2Fk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfbear%2Fk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfbear%2Fk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfbear%2Fk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lfbear","download_url":"https://codeload.github.com/lfbear/k/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245769290,"owners_count":20669155,"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":["kebectl","kubernetes","multi-cluster","shell-script","use-context"],"created_at":"2024-10-30T08:13:59.959Z","updated_at":"2025-03-27T02:31:11.018Z","avatar_url":"https://github.com/lfbear.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k\nA shell tool for kubectl contexts switch quickly, alias for `kebectl config use-context`\n\n## Prepare\nThe tool depends `kubectl`, assume that you can already use `kebectl`\n\n## Install\n\n### Way 1:\n\n`curl https://raw.githubusercontent.com/lfbear/k/main/install.sh | bash`\n\n### Way 2\n\n#### step 1. get code to your local\t\n\n`git clone https://github.com/lfbear/k`\n\n#### step 2. copy shell script\t\n\n`cd k \u0026\u0026 sh install.sh`\t\n\n### Create a Quick Command\n\nAdd `source ~/.kube/k.sh` to the bottom of your bash startup files, this file locate at one of the following file\n- **[linux bash]** `~/.bashrc` \n- **[Darwin native bash]** `~/.bash_profile` \n- **[zsh for linux or Darwin]** `~/.zshrc`\n- ...\n\n## Usage\n\n### show all available k8s clusters\n`# k`\n\n### switch the clusters naming 'dev'\n`# k dev`\n\nthen, u can use `kubectl` to do anything you want\n\n### screenshot\n\n![usage screenshot](https://github.com/lfbear/k/blob/main/cmd.jpg?raw=true)\n\n## Changelog\n\n- 2021.07.02 Add CurrentContext to the bash PS1 (issue #1)\n\n## Extension\n\n### How to use contenxts in kube config file\n\nhttps://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfbear%2Fk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfbear%2Fk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfbear%2Fk/lists"}