Skip to content

A Python script that generates Kubernetes configuration files, namespaces, roles, quotas, and certificates for multiple teams. The script takes arguments to configure the number of teams, the directory to output the files, and the resource quotas for each team.

License

Notifications You must be signed in to change notification settings

MarioGith/k8s-config-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8s-config-generator

Overview

k8s-config-generator is a Python script that generates Kubernetes configuration files for a specified number of teams. The generated files include namespaces, roles, role bindings, quotas, and client certificates. The script takes command-line arguments to configure the generated files.

Installation

  1. Clone this repository to your local machine:
git clone https://github.com/your_username/k8s-config-generator.git
  1. Install the required packages:
pip install -r requirements.txt

Usage

To use k8s-config-generator, run the following command:

python k8s_config.py --out_directory <output_directory> --namespace_count <number_of_namespaces> --kubeconfig_path <path_to_kubeconfig> --cpu_limit <cpu_limit> --memory_limit <memory_limit> --cpu_request <cpu_request> --memory_request <memory_request> --role_resources <role_resources> --verbs <verbs>

The command-line arguments are as follows:

  • --out_directory: The directory where the generated files will be saved.
  • --namespace_count: The number of namespaces to generate.
  • --kubeconfig_path: The path to the kubeconfig file.
  • --cpu_limit: The CPU limit for the quota.
  • --memory_limit: The memory limit for the quota.
  • --cpu_request: The CPU request for the quota.
  • --memory_request: The memory request for the quota.
  • --role_resources: The resources that the role will have access to.
  • --verbs: The verbs that the role will have access to.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Python script that generates Kubernetes configuration files, namespaces, roles, quotas, and certificates for multiple teams. The script takes arguments to configure the number of teams, the directory to output the files, and the resource quotas for each team.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages