Skip to main content

Qbertconfig

https://travis-ci.org/platform9/qbertconfig.svg?branch=master

Fetches kubeconfig from qbert API

kubectl config can be used used to manage kubeconfig files. However, gathering a kubeconfig file for a Platform9 Managed Kubernetes cluster is a manual process today. 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

pip install qbertconfig

Usage

qc [-h] [-k KUBECONFIG] <operation> [--name cluster_name] [--uuid cluster_uuid] [-c]

Supported Operations

  • fetch - get a kubeconfig for a PMK cluster

  • help - show this message

  • list-clusters - list available PMK clusters in the target Platform9 Managed Cloud

Providing Credentials

Qbertconfig uses the Openstack SDK to perform authentication against a Platform9 Cloud. Credentials can be provided in either a clouds.yaml file, environment variables, or by using the --os command-line arguments. For more information, please refer to the official documentation

Example

source ~/openstack.rc
qc fetch --name dev-cluster -k dev-cluster.kcfg.yml
export KUBECONFIG=$(pwd)/dev-cluster.kcfg.yml
kubeconfig get nodes --context dev-cluster
kubeconfig get pods -n foo

For more information on openstack rc files and how to generate them, see Installing Openstack CLI Clients.

Testing

Running Tests

pip install -r requirements.txt
nosetests -v -d tests/

Linting

flake8 --exclude versioneer.py

How it works

Here is the basic structure of a Kubeconfig:

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

Metadata

Release files for qbertconfig 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qbertconfig 0.3.5
File Size Uploaded Provenance Actions
qbertconfig-0.3.5.tar.gz 25.2 kB Without provenance Details for qbertconfig-0.3.5.tar.gz

Release files / qbertconfig-0.3.5.tar.gz

Download URL qbertconfig-0.3.5.tar.gz
Size 25.2 kB
Tags Source
SHA-256 checksum
How to use checksums
37b1a24d2fa3f68af9c612427931ea88990388930fa515156db5f6e319db3094
BLAKE2b-256 checksum
How to use checksums
e164d8a868e86ca0ed307e620f3b37ac19745c59e604bacff252c1fccf626b78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/2.7.15

Security for qbertconfig 0.3.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page