https://github.com/bit-cloner/kcg
Kubernetes config generator
https://github.com/bit-cloner/kcg
Last synced: 2 months ago
JSON representation
Kubernetes config generator
- Host: GitHub
- URL: https://github.com/bit-cloner/kcg
- Owner: bit-cloner
- License: mit
- Created: 2020-08-07T13:54:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T17:01:09.000Z (about 5 years ago)
- Last Synced: 2024-06-21T17:02:00.131Z (about 2 years ago)
- Language: Go
- Size: 42.7 MB
- Stars: 17
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cloud-native - kcg - Kubernetes config generator. (Configuration & Policy Automation)
README
## What is KCG?
Kubernetes config generator is an interactive command line tool that lets you create kubeconfig files
related to a service account in a given namespace. The user can interactively chose a namespace and service account from a K8 cluster.
The output is a config file with token authentication that has same RBAC permissions assigned to chosen
service account.
### Demo

### Prerequisites
Default behaviour of this tool is to look in .kube directory for config file and it should have permissions to read namespaces, secrets, and serviceaccounts at cluster level.
It can also look for credentials of the K8 cluster you want to work with from Environment variable KUBECONFIG just like kubectl would.
### Get it
For Linux
```
wget https://github.com/bit-cloner/kcg/releases/download/0.9/linux-amd64-kcg
chmod +x linux-amd64-kcg
./linux-amd64-kcg
```
One liner
```
wget https://github.com/bit-cloner/kcg/releases/download/0.9/linux-amd64-kcg && sudo chmod +x ./linux-amd64-kcg && ./linux-amd64-kcg
```
For Windows
```
$url = "https://github.com/bit-cloner/kcg/releases/download/0.9/windows-386-kcg.exe"
$output = "kcg.exe"
Invoke-WebRequest -Uri $url -OutFile $output -UseBasicParsing
./kcg
```
Tested on windows powershell (not PowerShell ISE) and [Terminal](https://github.com/microsoft/terminal) app
For Mac
```
wget https://github.com/bit-cloner/kcg/releases/download/0.9/darwin-amd64-kcg
chmod +x darwin-amd64-kcg
./darwin-amd64-kcg
```
Install it as a kubectl plugin
```
wget https://github.com/bit-cloner/kcg/releases/download/0.9/kubectl-kcg
sudo cp kubectl-kcg /usr/local/bin
kubectl plugin list
kubectl kcg
```
Support:
