Fetches kubeconfigs from qbert API
Project description
Qbertconfig
===========
Fetches kubeconfig from qbert API
Although the ```kubectl config```_ command is used to manage
kubeconfigs, we have no way to pull a kubeconfig from Platform9 Managed
Kubernetes’ Qbert API. This aims to solve that problem by downloading
and merging clusters’ kubeconfigs with existing kubeconfig files.
Installation
------------
It’s strongly recommended to use a python virtualenv
.. code:: bash
pip install qbertconfig
Usage
-----
.. code:: bash
qc [-h] [-k KUBECONFIG] fetch [--name cluster_name] [--uuid cluster_uuid]
*Note: The client also supports all ``--os`` cli flags provided by
os-client-config*
Testing
-------
Yes, really, there are tests
.. code:: bash
pip install -r requirements.txt
nosetests -v -d tests/
How it works
------------
Here is the basic structure of a Kubeconfig:
.. code:: yaml
apiVersion: v1
kind: Config
preferences: {}
current-context: default
clusters: []
contexts: []
users: []
Each of cluster, context, or user, has a ``name`` associated with it.
This is the unique identifier for each object, and each context uses
these names to tie it all together.
Each of these sections can be managed with the ``kubectl config``
command. [`Documentation`_]
This utility will fetch a fresh kubeconfig from the Qbert API, and merge
it’s details into the specified kubeconfig.
With the fresh kubeconfig, the following sections are renamed to resolve
common collisions when managing many PMK clouds.
- ``user`` is renamed to ``fqdn-username`` to align with unique
keystone environments
- ``context`` is renamed to the ``cluster_name``
- ``cluster`` is renamed to the ``cluster_uuid``
.. _``kubectl config``: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#config
.. _Documentation: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#config
===========
Fetches kubeconfig from qbert API
Although the ```kubectl config```_ command is used to manage
kubeconfigs, we have no way to pull a kubeconfig from Platform9 Managed
Kubernetes’ Qbert API. This aims to solve that problem by downloading
and merging clusters’ kubeconfigs with existing kubeconfig files.
Installation
------------
It’s strongly recommended to use a python virtualenv
.. code:: bash
pip install qbertconfig
Usage
-----
.. code:: bash
qc [-h] [-k KUBECONFIG] fetch [--name cluster_name] [--uuid cluster_uuid]
*Note: The client also supports all ``--os`` cli flags provided by
os-client-config*
Testing
-------
Yes, really, there are tests
.. code:: bash
pip install -r requirements.txt
nosetests -v -d tests/
How it works
------------
Here is the basic structure of a Kubeconfig:
.. code:: yaml
apiVersion: v1
kind: Config
preferences: {}
current-context: default
clusters: []
contexts: []
users: []
Each of cluster, context, or user, has a ``name`` associated with it.
This is the unique identifier for each object, and each context uses
these names to tie it all together.
Each of these sections can be managed with the ``kubectl config``
command. [`Documentation`_]
This utility will fetch a fresh kubeconfig from the Qbert API, and merge
it’s details into the specified kubeconfig.
With the fresh kubeconfig, the following sections are renamed to resolve
common collisions when managing many PMK clouds.
- ``user`` is renamed to ``fqdn-username`` to align with unique
keystone environments
- ``context`` is renamed to the ``cluster_name``
- ``cluster`` is renamed to the ``cluster_uuid``
.. _``kubectl config``: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#config
.. _Documentation: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#config
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for qbertconfig-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84fe9b0e2b7e78211eee724112ede194157eb7408dc0478052b6881a9972ce22 |
|
MD5 | 0e979fdee1ac56b482a0957b6bd2e29e |
|
BLAKE2b-256 | 4aa6dd48e54fa7d0d072057f4ac9ff597462d0e1cd1c2231c3e17eb5a7f58495 |