{"id":13451565,"url":"https://github.com/reconquest/tubekit","last_synced_at":"2025-04-10T04:58:21.614Z","repository":{"id":36382394,"uuid":"172321078","full_name":"reconquest/tubekit","owner":"reconquest","description":"🧪 kubectl alternative with quick context switching, kubectl on steroids","archived":false,"fork":false,"pushed_at":"2023-07-04T06:49:37.000Z","size":64,"stargazers_count":216,"open_issues_count":4,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-03T01:08:53.320Z","etag":null,"topics":["aliases","cli","kubectl","kubernetes","productivity"],"latest_commit_sha":null,"homepage":"","language":"Go","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/reconquest.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}},"created_at":"2019-02-24T09:53:29.000Z","updated_at":"2025-04-02T02:50:27.000Z","dependencies_parsed_at":"2024-01-14T09:58:33.931Z","dependency_job_id":"8e9077c2-0488-41cd-b44a-143e477493a5","html_url":"https://github.com/reconquest/tubekit","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconquest%2Ftubekit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconquest%2Ftubekit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconquest%2Ftubekit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconquest%2Ftubekit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reconquest","download_url":"https://codeload.github.com/reconquest/tubekit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161264,"owners_count":21057554,"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":["aliases","cli","kubectl","kubernetes","productivity"],"created_at":"2024-07-31T07:00:55.973Z","updated_at":"2025-04-10T04:58:21.593Z","avatar_url":"https://github.com/reconquest.png","language":"Go","funding_links":[],"categories":["Go","API/CLI adaptors"],"sub_categories":["[Jenkins](#jenkins)"],"readme":"# TUBEKIT\n[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors)\n\ntubekit helps you to operate Kubernetes clusters more effectively by reducing\ntime spent on everyday routines.\n\n## tubectl\n\n[![Build Status](https://travis-ci.org/reconquest/tubekit.svg?branch=master)](https://travis-ci.org/reconquest/tubekit)\n\nTubectl is a simple yet powerful wrapper around kubectl which adds a bit of magic\nto your everyday kubectl routines by reducing the complexity of working with\ncontexts, namespaces and intelligent matching resources.\n\n## Installation\n\n#### Arch Linux\n\nThe package is always available in AUR:\n[tubekit-git](https://aur.archlinux.org/packages/tubekit-git).\n\n#### Debian/Fedora/CentOS\n\nPackages can be found on [releases page](https://github.com/reconquest/tubekit/releases).\n\n#### nix (on Linux or macOS) / nixOS\n\nWith flakes support:\n\n```\n$ nix profile install github:reconquest/tubekit\n```\n\n#### macOS\n\n```\nbrew tap reconquest/tubekit https://github.com/reconquest/tubekit.git\nbrew install tubekit\n```\n\n#### Binaries\n\nBinaries can be found on [releases page](https://github.com/reconquest/tubekit/releases).\n\n#### Standalone\n\nWith your [GOPATH](https://github.com/golang/go/wiki/GOPATH) already set up:\n\n```\ngo get github.com/reconquest/tubekit/cmd/...\n```\n\n## Usage\n\n[![asciicast](https://asciinema.org/a/233185.svg)](https://asciinema.org/a/233185)\n\n### Quick context\n\nVery often you need to switch between environments and therefore you need to\nswitch your kubectl's context or specify it in kubectl's command line with the flag\n`--context`. Well, there is even no short option for that flag. This is where\ntubectl starts its magic.\n\nYou can just specify `@` followed by a name of the context, you don't need to specify\nfull name of the context, it will be matched by the existing list of contexts\nspecified in your kubectl configs.\n\nInstead of typing `kubectl --context staging` or `kubectl --context production`\nnow you just type `tubectl @st` or `tubectl @prod`. It doesn't mean that\n`--context` will no longer work because it will. `tubectl` does not break\n`kubectl` as it has full backwards compatibility with the original kubectl.\n\n### Quick namespaces\n\nBoring to type `-n monitoring`, huh? Here is the solution — don't type so much,\njust type `+mon` with tubectl. tubectl retrieves a list of namespaces from\na cluster and matches given namespace. It's fully back compatible with `-n\n--namespace` flags.\n\nForget about `--all-namespaces`, just use the `++` flag.\n\nWith kubectl you used to do like that:\n\n```\nkubectl --context staging --all-namespaces get pods\n```\n\nNow you can type:\n```\ntubectl @st ++ get pods\n```\n\nInstead of `kube-system` in such command:\n```\nkubectl get pods -n kube-system\n```\n\nYou can now type like this:\n```\ntubectl get pods +sys\n```\n\nAlso, you can type `++` and `@st` at the end of cmdline or in the middle of\nit, it really doesn't matter — tubectl will figure it out.\n\n### Resource matching\n\nThat is the real panacea for several problems if you ever had a thought like:\n* tailing logs of multiple containers at the same time\n* executing a command in multiple containers in serial or parallel mode\n* deleting/retrieving/patching all pods/deployments/ingresses matching given\n    regular expression\n* just want to attach to the first container of the pod with several replicas whatever\n    suffix it might have\n\nMeet the matching operator — `%`. \n\nFor example, we have two replicas of nginx running in a cluster:\n```\nnginx-59d4c6bbcf-dft5z                  1/1     Running   8          18d\nnginx-59d4c6bbcf-dvfd2                  1/1     Running   8          18d\n```\n\nInstead of getting the list of pods and then running `kubectl logs` against all\nof them you can do the following:\n\n```\ntubectl logs nginx%\n```\n\nYou need to put `%` at the end of your matching query, tubectl will figure out\nwhat resource are you trying to match, will retrieve list of these resources\nfrom given cluster with given namespace, will match it and then run your\ncommand against these resources with all other arguments you've passed.\n\nWhen you specify one `%` at the end of the query tubectl will run the command\nagainst all matched resources. If you want to run only against a specific\nreplica, you need to specify its number like `%:X`, example:\n\n```\ntubectl logs nginx%:1\n```\n\nIn this example, tubectl will retrieve all pods matching `nginx` and then get\n1st pod from the list, the same can be applied to the second pod — `%:2`.\n\n**What if you want to run the command against all the pods but in parallel mode?**\n\nSimilar to `++` for `--all-namespaces` tubectl introduces an operator `%%`,\nlet's say you want to tail logs of all nginx pods at the same time, then you\njust do the following:\n\n```\ntubectl logs nginx%% -f\n```\n\ntubectl will match resources and will run `kubectl logs` against all pods at\nthe same time.\n\n### Other advanced examples\n\n* Deleting all deployments matching word `backend` in `staging` namespace\n\n    ```\n    tubectl delete deployment +stag backend%\n    ```\n\n    or in parallel (concurrent) mode:\n\n    ```\n    tubectl delete deployment +stag backend%%\n    ```\n\n* Describing all statefulsets matching word `redis` in `staging` namespace\n\n    ```\n    tubectl describe sts +stag redis%%\n    ```\n\n    or in parallel (concurrent) mode:\n\n    ```\n    tubectl describe sts +stag redis%%\n    ```\n\n* Executing a command in all pods matching word `apiserver` or `scheduler` in\n    `kube-system` namespace \n\n    ```\n    tubectl exec +sys '(apiserver|scheduler)%' -- id\n    ```\n\n    or in parallel (concurrent) mode:\n\n    ```\n    tubectl exec +sys '(apiserver|scheduler)%%' -- id\n    ```\n\n### Custom flags\n\nTubectl supports a few own flags, they all have prefix `--tube`:\n\n* `--tube-version` - prints version of the program\n* `--tube-debug` - enables debug mode, also can be turned on by `TUBEKIT_DEBUG`\n* `--tube-help` - prints short help message about the program.\n\n#### Support\n\nHave a question or problem? Join us in Slack:\n[slack.reconquest.io](https://slack.reconquest.io)\n\n### Authors\n\n* [Egor Kovetskiy](https://github.com/kovetskiy)\n* [Stanislav Seletskiy](https://github.com/seletskiy)\n\nHire us, we do reduce business costs by optimizing the things.\n\n### License\n\nMIT\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n\u003ctable\u003e\u003ctr\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/saromanov\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/7413968?v=4\" width=\"100px;\" alt=\"Sergey Romanov\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSergey Romanov\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/reconquest/tubekit/commits?author=saromanov\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"http://dmitry.shaposhnik.name\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/27363?v=4\" width=\"100px;\" alt=\"Dmitry Shaposhnik\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDmitry Shaposhnik\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#platform-e1senh0rn\" title=\"Packaging/porting to new platform\"\u003e📦\u003c/a\u003e\u003c/td\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"https://twitter.com/nesl247\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/1037526?v=4\" width=\"100px;\" alt=\"Harrison Heck\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHarrison Heck\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#platform-nesl247\" title=\"Packaging/porting to new platform\"\u003e📦\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freconquest%2Ftubekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freconquest%2Ftubekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freconquest%2Ftubekit/lists"}