Skip to main content

kubelab-cli Kubernetes made easy - handle clusters and product with simple commands!

Project description

kubelab-cli - Kubernetes utility CLI by KubeLab

kubelab-cli is a command line tool that empowers developers to effortlessly create, manage, and destroy Kubernetes clusters on popular cloud providers such as AWS, Azure, and GCP, obtaining Terraform code and easy yaml configs in return.

Additionally, it enables users to easily manage products on top of the clusters, such as NGINX, and deploy them using various methods like deployment, operator or custom (like Helm, and Kustomize - coming soon).

Features

  • Cluster Management: Easily create, update, and destroy Kubernetes clusters on AWS, Azure, or GCP with a simple command.

  • Product Management: Seamlessly manage products like NGINX on top of your Kubernetes clusters using different deployment strategies, including deployment, operator, Helm, and Kustomize.

  • Deployment Flexibility: kubelab-cli provides multiple options for your deployment to cater to different use cases and preferences.

  • Automated Setup: The tool automates the setup process for all the cloud-specific tools you need to manage Kubernetes clusters, saving you time and effort.

  • Easy Configuration: Intuitive YAML configuration that allow you to customize the clusters and products according to your specific needs.

  • Clear Documentation: Comprehensive documentation to guide you through the installation, setup, and usage of the kubelab-cli tool (coming soon).

Prerequisites

Before using kubelab-cli, ensure you have the following dependencies installed on your system:

  • Kubernetes CLI (kubectl)
  • AWS CLI (if using AWS as a cloud provider)
  • Azure CLI (if using Azure as a cloud provider)
  • Google Cloud CLI (if using GCP as a cloud provider)

Or you can use the kubelab-cli install script to install all the dependencies for you. Run the following command to install the dependencies:

curl -s https://raw.githubusercontent.com/kubelab-middleware/install.sh | bash

Prerequisites (contribution only)

Linter+formatter: black + flake8 https://py-vscode.readthedocs.io/en/latest/files/linting.html

Add into your .vscode/settings.json

"python.linting.flake8Args": [
  "--max-line-length=180",
  "--ignore=E501,E402,F841,F401,E302,E305",
],

Installation

  1. Download the kubelab-cli binary for your operating system from the official GitHub repository.

  2. Place the binary in a directory accessible from your system's PATH variable.

  3. Ensure the binary has executable permissions. If not, you can set them using chmod +x lab.

Usage

lab [command] [options]

Cluster Management

  • To create a Kubernetes cluster:

    lab create cluster --provider [aws|azure|gcp] --name [cluster_name]
    
  • To update a Kubernetes cluster (e.g., change node count, update version, etc.):

    lab update cluster --name [cluster_name] --[option1]=[value1] --[option2]=[value2] ...
    
  • To destroy a Kubernetes cluster:

    lab destroy cluster --name [cluster_name]
    

Product Management

  • To deploy a product (e.g., NGINX) using default settings:

    lab use cluster [cluster_name] # a bit like kubectl use-context
    lab add [product_name] --cluster [cluster_name] --type [deployment|operator]
    

    or

    lab add [product_name] --cluster [cluster_name] --type [deployment|operator]
    
  • To deploy a product with custom configurations:

    lab add [product_name] --cluster [cluster_name] --method [deployment|operator|] --config [path_to_config_file]
    
  • To update a deployed product:

    lab update [product_name] --version [new version] --cluster [cluster_name] (--method [deployment|operator]) --config [path_to_updated_config_file]
    
  • To remove a deployed product from the cluster:

    lab remove [product_name] --cluster [cluster_name]
    

Configuration

kubelab-cli supports configuration files to define cluster and product settings. By default, it looks for a configuration file in the credentials/ directory named clusters.yaml. You can also specify a custom configuration file using the --config flag.

Example Configuration (clusters.yaml)

# Clusters configuration
cluster:
  name: my-cluster
  provider: aws
  region: us-west-2

Example Configuration (catalog.yaml)

# Product configuration
products:
  - name: nginx
    method: deployment
    version: 3.0.2
    values_file: nginx-values.yaml

Support and Contribution

If you encounter any issues or have suggestions for improvement, please check the GitHub repository for known issues or open a new one. Contributions are highly encouraged and welcome!

License

kubelab-cli is open-source software licensed under the MIT License. Feel free to use, modify, and distribute it according to the terms of the license.


Thank you for using kubelab-cli! If you have any questions or need further assistance, please refer to the documentation or reach out to the Discord community of KubeLab for support.

Other OSS tools embedded or used in kubelab-cli

Documentation

The kubelab-cli documentation can be found here.

Security

The security policy may be found here.

Project details


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

kubelab_cli-0.1.7-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file kubelab_cli-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: kubelab_cli-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for kubelab_cli-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 bf49b1aad86ece82a6bb7e485ad0d659422093569fab7fce3f2ea2e429c41ac4
MD5 6297184a42197de6fe5cb1120d67fa48
BLAKE2b-256 03c9011dced74a13238759c76d44b1c7657877590a0f1cb67938a1bb34a0d32c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page