Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxgio92/proxy-kubeconfig-generator
Generate Kubeconfig from ServiceAccount for Kubernetes API server proxies.
https://github.com/maxgio92/proxy-kubeconfig-generator
automation capsule kubernetes multitenancy proxy
Last synced: 23 days ago
JSON representation
Generate Kubeconfig from ServiceAccount for Kubernetes API server proxies.
- Host: GitHub
- URL: https://github.com/maxgio92/proxy-kubeconfig-generator
- Owner: maxgio92
- License: apache-2.0
- Created: 2022-06-06T17:46:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-29T14:35:08.000Z (10 months ago)
- Last Synced: 2024-06-20T00:28:26.868Z (5 months ago)
- Topics: automation, capsule, kubernetes, multitenancy, proxy
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# proxy-kubeconfig-genenerator
It generates a Kubeconfig Secret from a Service Account and a Kubernetes API server proxy.
## Synopsis
```
proxy-kubeconfig-generator \
--serviceaccount \
--server \
--server-tls-secret-name \
[options]
```## Options
```
-serviceaccount string
The name of the service account for which to create the kubeconfig
-namespace string
(optional) The namespace of the service account and where the kubeconfig secret will be created. (default "default")
-server string
The server url of the kubeconfig where API requests will be sent
-server-tls-secret-name string
The server TLS secret name
-server-tls-secret-ca-key string
(optional) The CA key in the server TLS secret. (default "ca")
-server-tls-secret-namespace string
(optional) The namespace of the server TLS secret. (default "default")
-kubeconfig-secret-key string
(optional) The key of the kubeconfig in the secret that will be created (default "kubeconfig")
```## Quick start
### Build and pull the OCI image
#### Pre-requisites
- [`pack`](https://github.com/buildpacks/pack) Buildpack CLI
- [KinD](https://kind.sigs.k8s.io)#### Build and load
```
pack build generator --path .
kind create cluster
kind load docker-image generator:latest
```### Deploy the generator
```
kubectl apply -k ./deploy/generator
```### Give it a try
**Create a cluster**
```
kind create cluster
```**Add Clastix Helm Repository**
```
helm repo add clastix https://clastix.github.io/charts
```**Deploy Capsule**
```
helm upgrade --install -n default clastix/capsule
```**Deploy Capsule Proxy**
```
helm upgrade --install -n default clastix/capsule-proxy
```**Deploy a Tenant**
```
kubectl apply -f ./deploy/tenant/dev-team
```**Deploy the generator Job**
```
pack build generator --path .
kind load docker-image generator:latest
kubectl apply -k ./deploy/generator
```**Check the result**
```
$ kubectl get secret -n dev-team gitops-reconciler-kubeconfig
NAME TYPE DATA AGE
gitops-reconciler-kubeconfig Opaque 1 1s
```