kubens


Namekubens JSON
Version 1.2.5 PyPI version JSON
download
home_pagehttps://github.com/roubles/kubens
SummaryTerminal kubectl namespace selector
upload_time2024-08-22 20:17:40
maintainerNone
docs_urlNone
authorroubles
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            kubens
======

``kubens`` is a command line tool to interactively select and set
Kubernetes namespaces.

.. code:: bash

   ~$ kubens
   Current namespace: my-namespace
   Pick your namespace:

   => default
      kube-system
      my-namespace
      another-namespace
      exit

Install
-------

.. code:: bash

   pip install kubens

Clone the repo:

.. code:: bash

   $ git clone https://github.com/roubles/kubens
   $ cd kubens
   $ pip install .

Copy Code

Usage
-----

.. code:: bash

   usage: kubens [-h] [--list] [substring]


   interactively pick a k8s namespace


   positional arguments:
   substring substring to filter namespaces (must match from the beginning)


   optional arguments:
   -h, --help show this help message and exit
   -l, --list list namespaces instead of launching interactive menu

Examples
~~~~~~~~

Selecting namespaces
^^^^^^^^^^^^^^^^^^^^

To run ``kubens`` and select a namespace interactively:

.. code:: bash

   $ kubens

To run ``kubens`` and set the namespace directly if there is an exact
(or partial) match:

::

   $ kubens my-namespace

If there are multiple matches, it will show a menu to select from.

Listing namespaces
^^^^^^^^^^^^^^^^^^

To list namespaces:

.. code:: bash

   $ kubens --list

To list namespaces with a filter:

.. code:: bash

   $ kubens --list ku

This will list namespaces that start with “ku”.

Features
~~~~~~~~

-  Interactively select a Kubernetes namespace from the terminal.
-  Displays the current namespace.
-  Sets the selected namespace as the current context.
-  Lists namespaces with the ``-l`` or ``--list`` argument.
-  Filters namespaces based on a substring that must match from the
   beginning.

Requirements
~~~~~~~~~~~~

-  Python 2.7 or later
-  ``kubectl`` installed and configured
-  ``pick`` library (installed automatically with
   ``pip install kubens``)

License
~~~~~~~

This project is licensed under the MIT license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/roubles/kubens",
    "name": "kubens",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "roubles",
    "author_email": "rouble@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bc/22/4158e3c12d9118d03da9c493cf05091961eb4ae7ebbc4fabf0e1c3d1bf6a/kubens-1.2.5.tar.gz",
    "platform": null,
    "description": "kubens\n======\n\n``kubens`` is a command line tool to interactively select and set\nKubernetes namespaces.\n\n.. code:: bash\n\n   ~$ kubens\n   Current namespace: my-namespace\n   Pick your namespace:\n\n   => default\n      kube-system\n      my-namespace\n      another-namespace\n      exit\n\nInstall\n-------\n\n.. code:: bash\n\n   pip install kubens\n\nClone the repo:\n\n.. code:: bash\n\n   $ git clone https://github.com/roubles/kubens\n   $ cd kubens\n   $ pip install .\n\nCopy Code\n\nUsage\n-----\n\n.. code:: bash\n\n   usage: kubens [-h] [--list] [substring]\n\n\n   interactively pick a k8s namespace\n\n\n   positional arguments:\n   substring substring to filter namespaces (must match from the beginning)\n\n\n   optional arguments:\n   -h, --help show this help message and exit\n   -l, --list list namespaces instead of launching interactive menu\n\nExamples\n~~~~~~~~\n\nSelecting namespaces\n^^^^^^^^^^^^^^^^^^^^\n\nTo run ``kubens`` and select a namespace interactively:\n\n.. code:: bash\n\n   $ kubens\n\nTo run ``kubens`` and set the namespace directly if there is an exact\n(or partial) match:\n\n::\n\n   $ kubens my-namespace\n\nIf there are multiple matches, it will show a menu to select from.\n\nListing namespaces\n^^^^^^^^^^^^^^^^^^\n\nTo list namespaces:\n\n.. code:: bash\n\n   $ kubens --list\n\nTo list namespaces with a filter:\n\n.. code:: bash\n\n   $ kubens --list ku\n\nThis will list namespaces that start with \u201cku\u201d.\n\nFeatures\n~~~~~~~~\n\n-  Interactively select a Kubernetes namespace from the terminal.\n-  Displays the current namespace.\n-  Sets the selected namespace as the current context.\n-  Lists namespaces with the ``-l`` or ``--list`` argument.\n-  Filters namespaces based on a substring that must match from the\n   beginning.\n\nRequirements\n~~~~~~~~~~~~\n\n-  Python 2.7 or later\n-  ``kubectl`` installed and configured\n-  ``pick`` library (installed automatically with\n   ``pip install kubens``)\n\nLicense\n~~~~~~~\n\nThis project is licensed under the MIT license.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Terminal kubectl namespace selector",
    "version": "1.2.5",
    "project_urls": {
        "Download": "https://github.com/roubles/kubens/tarball/1.2.5",
        "Homepage": "https://github.com/roubles/kubens"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6395fd5faf30800b3d31e8bcd325f4d40c2320551c189e82aa73dec0c527d4d9",
                "md5": "75096de856e2e3422ae421c2b177b827",
                "sha256": "e3178f73f5fb128c593980510c0f0edca7a22dd90d4bf7c6917e80de49e1633c"
            },
            "downloads": -1,
            "filename": "kubens-1.2.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "75096de856e2e3422ae421c2b177b827",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4344,
            "upload_time": "2024-08-22T20:17:39",
            "upload_time_iso_8601": "2024-08-22T20:17:39.031415Z",
            "url": "https://files.pythonhosted.org/packages/63/95/fd5faf30800b3d31e8bcd325f4d40c2320551c189e82aa73dec0c527d4d9/kubens-1.2.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bc224158e3c12d9118d03da9c493cf05091961eb4ae7ebbc4fabf0e1c3d1bf6a",
                "md5": "2999b8c1ec57b9d037593351837a833e",
                "sha256": "9317929db7bc7db90fa4e1763c10b6cb53a5b098e9514c33c966779c90197e11"
            },
            "downloads": -1,
            "filename": "kubens-1.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "2999b8c1ec57b9d037593351837a833e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4663,
            "upload_time": "2024-08-22T20:17:40",
            "upload_time_iso_8601": "2024-08-22T20:17:40.530750Z",
            "url": "https://files.pythonhosted.org/packages/bc/22/4158e3c12d9118d03da9c493cf05091961eb4ae7ebbc4fabf0e1c3d1bf6a/kubens-1.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 20:17:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "roubles",
    "github_project": "kubens",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "kubens"
}
        
Elapsed time: 0.54341s