{"id":18265832,"url":"https://github.com/mbianchidev/klab-cli","last_synced_at":"2025-04-04T21:32:04.080Z","repository":{"id":195508801,"uuid":"650167181","full_name":"mbianchidev/klab-cli","owner":"mbianchidev","description":"K-Lab - the utility command line to help you manage your Kubernetes clusters in a consistent way across clouds and tenants","archived":false,"fork":false,"pushed_at":"2024-10-22T08:36:39.000Z","size":3512,"stargazers_count":5,"open_issues_count":10,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-23T09:03:15.515Z","etag":null,"topics":["aws","azure","cli","gcp","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbianchidev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-06T13:38:28.000Z","updated_at":"2024-10-22T08:36:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"5657c727-3f79-4fb8-8e53-982d992b7b14","html_url":"https://github.com/mbianchidev/klab-cli","commit_stats":null,"previous_names":["mbianchidev/klab-cli","kubelab-cloud/kubelab-cli"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbianchidev%2Fklab-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbianchidev%2Fklab-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbianchidev%2Fklab-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbianchidev%2Fklab-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbianchidev","download_url":"https://codeload.github.com/mbianchidev/klab-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223159510,"owners_count":17097475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","azure","cli","gcp","kubernetes"],"created_at":"2024-11-05T11:20:04.121Z","updated_at":"2024-11-05T11:20:04.916Z","avatar_url":"https://github.com/mbianchidev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Klab-cli - Kubernetes utility CLI\n\n[![KLab CLI CI/CD](https://github.com/mbianchidev/klab-cli/actions/workflows/klab-cli.yml/badge.svg)](https://github.com/mbianchidev/klab-cli/actions/workflows/klab-cli.yml)\n\n![Homer Simpson taking an escalator to Paradise but actually falling into Platform Engineering hell](/docs/images/platform-engineering.gif)\n\nKlab-cli is a command line tool, built in python, 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.\n\nAdditionally, it enables users to easily manage products on top of the clusters, such as NGINX, and deploy them using your own configuration as deployments, operators, CRDs...\n\n## Features\n\n- **Cluster Management:** Easily create, update, and destroy Kubernetes clusters on AWS, Azure, or GCP with a simple command.\n\n- **Product Management:** Seamlessly manage products like NGINX on top of your Kubernetes clusters using different deployment strategies, including deployment, operator, Helm, and Kustomize.\n\n- **Deployment Flexibility:** klab-cli provides multiple options for your deployment to cater to different use cases and preferences.\n\n- **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.\n\n- **Easy Configuration:** Intuitive YAML configuration that allow you to customize the clusters and products according to your specific needs.\n\n- **Clear Documentation:** Comprehensive documentation to guide you through the installation, setup, and usage of the klab-cli tool (coming soon).\n\n## Prerequisites\n\nBefore using klab-cli, ensure you have the following dependencies installed on your system:\n\n- Python 3.11.x\n- Kubernetes CLI (kubectl)\n- AWS CLI (if using AWS as a cloud provider)\n- Azure CLI (if using Azure as a cloud provider)\n- Google Cloud CLI (if using GCP as a cloud provider)\n- Terraform CLI\n\nOr you can use the klab-cli install script to install all the dependencies for you.\nRun the following command to install the dependencies and the cli itself:\n\n```bash\ncurl -s https://raw.githubusercontent.com/mbianchidev/klab-cli/main/install.sh | bash\n```\n\n## Prerequisites (contribution only)\n\nLinter+formatter: black + flake8\nhttps://py-vscode.readthedocs.io/en/latest/files/linting.html\n\nAdd into your .vscode/settings.json\n\n```json\n\"python.linting.flake8Args\": [\n  \"--max-line-length=180\",\n  \"--ignore=E501,E402,F841,F401,E302,E305\",\n],\n```\n\n## Other means of installation\n\nA. Download the klab-cli binary for your operating system from the official GitHub repository, then place the repo in a directory you like, use it via python execution or add it to your PATH.\n\nB. Install it via pip:\n\n```bash\npip install klab-cli\n```\n\n## Usage\n\n```bash\nlab [command] [options]\n```\n\n### Cluster Management\n\n- To create a Kubernetes cluster:\n  ```bash\n  lab create cluster --provider [AWS|Azure|GCP] --name [cluster_name]\n  ```\n\n- To destroy a Kubernetes cluster:\n  ```bash\n  lab destroy cluster --name [cluster_name]\n  ```\n\n### Cloud Native Products\n\n- To deploy a product (e.g., NGINX) using default settings:\n  ```bash\n  lab add [product_name] --cluster [cluster_name] --type [deployment|operator]\n  ```\n\n- To update a deployed product:\n  ```bash\n  lab update [product_name] --version [new version] --cluster [cluster_name] (--type [deployment|operator])\n  ```\n\n- To remove a deployed product from the cluster:\n  ```bash\n  lab remove [product_name] --cluster [cluster_name]\n  ```\n\n## Configuration\n\nklab-cli uses configuration files to define cluster and product settings. By default, it looks for config files in the `catalog/` and `clusters/` directory.\nAs for the `providers/` folder it is used to store the terraform code for each cloud provider.\nWe have set up a structure for you to follow on IaC code, but you can customize and extend it to your liking, be aware that the code requires variables in order to be as generic as possible.\n\n### Example Configuration (cluster_sample.yaml)\n\n```yaml\n# Clusters configuration\nname: sample\nprovider: aws\nregion: us-east-1\ncredential_file: ~/.aws/credentials\nproducts:\n  - name: nginx\n    type: operator\n    version: 1.0.0\n    replicas: 2\n    port: 80\n```\n\n### Example Configuration (catalog.yaml)\n\n```yaml\n- product: nginx\n  default_version: latest\n  default_type: deployment\n  available_types:\n    - deployment\n    - operator\n  installed_version: \n  installed_type: \n  operatorRepo: https://github.com/nginxinc/nginx-ingress-helm-operator/\n  operatorVersion: 1.5.0\n  operatorImage: nginx/nginx-ingress-operator\n  operatorDir: catalog/nginx/nginx-ingress-helm-operator\n  deploymentFile: catalog/nginx/deployment/deployment.yaml\n  imageVersion: latest\n- product: istio\n  default_version: latest\n  default_type: deployment\n  available_types:\n    - deployment\n    - operator\n  installed_version:\n  installed_type:\n  operatorRepo: https://github.com/istio/istio/tree/master/operator\n  operatorVersion: 1.20.0\n  operatorImage: istio/operator\n  operatorDir: catalog/istio/istio-operator\n  deploymentFile: catalog/istio/deployment/deployment.yaml\n  imageVersion: latest\n```\n\n## Support and Contribution\n\nIf 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!\n\n## License\n\nklab-cli is open-source software licensed under the [MIT License](LICENSE). Feel free to use, modify, and distribute it according to the terms of the license.\n\n---\n\nThank you for using klab-cli! If you have any questions or need further assistance, please refer to the documentation or reach out to [maintainers](docs/CONTRIBUTING.md##Maintainers) for support.\n\n## Other OSS tools embedded or used in klab-cli\n- https://github.com/mondoohq/cnquery\n- https://github.com/derailed/k9s\n\n## Documentation\n\nDocumentation can be found [here](https://mb-consulting.dev/doc). (coming soon)\n\n## Security\n\nThe security policy may be [found here](SECURITY.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbianchidev%2Fklab-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbianchidev%2Fklab-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbianchidev%2Fklab-cli/lists"}