{"id":30874315,"url":"https://github.com/catvec/kube-namespace","last_synced_at":"2026-05-09T06:02:29.044Z","repository":{"id":151657095,"uuid":"143251593","full_name":"catvec/kube-namespace","owner":"catvec","description":"Run multiple kubectl commands in the same namespace","archived":false,"fork":false,"pushed_at":"2018-09-19T21:55:05.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-08T00:47:06.378Z","etag":null,"topics":["bash","kubectl","kubernetes","workflow"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/catvec.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2018-08-02T06:25:19.000Z","updated_at":"2019-10-24T04:14:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a448ff1-d9bd-4c36-9b66-a02b0abed5ae","html_url":"https://github.com/catvec/kube-namespace","commit_stats":null,"previous_names":["catvec/kube-namespace"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/catvec/kube-namespace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catvec%2Fkube-namespace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catvec%2Fkube-namespace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catvec%2Fkube-namespace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catvec%2Fkube-namespace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catvec","download_url":"https://codeload.github.com/catvec/kube-namespace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catvec%2Fkube-namespace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32809147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bash","kubectl","kubernetes","workflow"],"created_at":"2025-09-08T00:46:46.638Z","updated_at":"2026-05-09T06:02:29.012Z","avatar_url":"https://github.com/catvec.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Project status: Complete | Maintaining\n\n# Kube Namespace\nRun multiple kubectl commands in the same namespace.\n\n# Table Of Contents\n- [Overview](#overview)\n- [Tutorial](#tutorial)\n- [Install](#install)\n- [How It Works](#how-it-works)\n\n# Overview\nKube Namespace makes it easier to run multiple `kubectl` commands in the same\nnamespace.  \n\nWithout Kube Namespace the `--namespace` argument would have to be given every `kubectl` command:\n\n```\nkubectl --namespace product-foo-api get all\nkubectl --namespace product-foo-api describe pod/api-server-0\nkubectl --namespace product-foo-api exec api-server-0 /bin/bazz\n```\n\nWith Kube Namespace running multiple commands in the same namespace is much simplier:\n\n```\nkubens product-foo-api\n\nkubectl get all\nkubectl describe pod/api-server-0\nkubectl exec api-server-0 /bin/bazz\n```\n\n# Tutorial\nFirst set which namespace you would like to work in:\n\n```\nkubens \u003cnamespace\u003e\n# Or the longer form of the command\nkubens use \u003cnamespace\u003e\n```\n\nThen run `kubectl` commands as you normally would:\n\n```\nkubectl get services\nkubectl describe services/api-server\n```\n\nIf you need to override the namespace for one command the `kubectl --namespace` \nargument can be used as normal:\n\n```\nkubectl --namespace foo-bar get all\n```\n\nTo see what namespace you are working in:\n\n```\nkubens\n# Or the longer form of the command\nkubens show\n```\n\nTo stop working in a specific namespace:\n\n```\nkubens exit\n```\n\n# Install\nComplete the following steps to install Kube Namespace:\n\n1. Clone down the Kube Namespace repo\n   ```\n   git clone git@github.com:Noah-Huppert:kube-namespace.git \u003cinstall directory\u003e\n   ```\n2. Source the `kubens` file in the Kube Namespace repository\n   ```\n   # In your shell profile\n   . \u003cinstall directory\u003e/kubens\n   ```\n3. Make an alias to the Kube Namespace command\n   ```\n   # In your shell profile\n   alias kubectl=\"kubens run\"\n   ```\n   This allows you to use the `kubectl` with enhanced namespace functionality\n\n# How It Works\nKube Namespace provides a simple `kubens` bash function.  \n\nThis function has 4 sub-commands:\n\n- `use NAMESPACE`\n\t- Records which Kubernetes namespace the user wants to work in by \n\t  setting the `KUBENS_NAMESPACE` environment variable\n- `show`\n\t- Shows which Kubernetes namespace a user is working in by printing the \n\t  `KUBENS_NAMESPACE` environment variable\n- `exit`\n\t- Clears the desired Kubernetes namespace by unsetting the \n\t  `KUBENS_NAMESPACE` environment variable\n- `run ARGS...`\n\t- Executes the normal `kubectl` binary with the `--namespace` argument \n\t  set to the value of the `KUBENS_NAMESPACE` environment variable\n\t- If the user provides their own `--namespace` argument value it will \n\t  override the namespace set by the Kube Namespace tool\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatvec%2Fkube-namespace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatvec%2Fkube-namespace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatvec%2Fkube-namespace/lists"}