Package: kubelab-cli
kubelab-cli - Kubernetes utility CLI by KubeLabkubelab-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).FeaturesCluster 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).PrerequisitesBefore 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-shttps://raw.githubusercontent.com/kubelab-middleware/install.sh|bashPrerequisites (contribution only)Linter+formatter: black + flake8https://py-vscode.readthedocs.io/en/latest/files/linting.htmlAdd into your .vscode/settings.json"python.linting.flake8Args":["--max-line-length=180","--ignore=E501,E402,F841,F401,E302,E305",],InstallationDownload the kubelab-cli binary for your operating system from the official GitHub repository.Place the binary in a directory accessible from your system's PATH variable.Ensure the binary has executable permissions. If not, you can set them usingchmod +x lab.Usagelab[command][options]Cluster ManagementTo create a Kubernetes cluster:labcreatecluster--provider[aws|azure|gcp]--name[cluster_name]To update a Kubernetes cluster (e.g., change node count, update version, etc.):labupdatecluster--name[cluster_name]--[option1]=[value1]--[option2]=[value2]...To destroy a Kubernetes cluster:labdestroycluster--name[cluster_name]Product ManagementTo deploy a product (e.g., NGINX) using default settings:labusecluster[cluster_name]# a bit like kubectl use-contextlabadd[product_name]--cluster[cluster_name]--type[deployment|operator]orlabadd[product_name]--cluster[cluster_name]--type[deployment|operator]To deploy a product with custom configurations:labadd[product_name]--cluster[cluster_name]--method[deployment|operator|]--config[path_to_config_file]To update a deployed product:labupdate[product_name]--version[newversion]--cluster[cluster_name](--method[deployment|operator])--config[path_to_updated_config_file]To remove a deployed product from the cluster:labremove[product_name]--cluster[cluster_name]Configurationkubelab-cli supports configuration files to define cluster and product settings. By default, it looks for a configuration file in thecredentials/directory namedclusters.yaml. You can also specify a custom configuration file using the--configflag.Example Configuration (clusters.yaml)# Clusters configurationcluster:name:my-clusterprovider:awsregion:us-west-2Example Configuration (catalog.yaml)# Product configurationproducts:-name:nginxmethod:deploymentversion:3.0.2values_file:nginx-values.yamlSupport and ContributionIf 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!Licensekubelab-cli is open-source software licensed under theMIT 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 theDiscord community of KubeLabfor support.Other OSS tools embedded or used in kubelab-clihttps://github.com/mondoohq/cnqueryhttps://github.com/derailed/k9sDocumentationThe kubelab-cli documentation can be foundhere.SecurityThe security policy may befound here.