Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Kyrremann/kubectl-eksporter
A simple Ruby-script to export k8s resources
https://github.com/Kyrremann/kubectl-eksporter
Last synced: 2 months ago
JSON representation
A simple Ruby-script to export k8s resources
- Host: GitHub
- URL: https://github.com/Kyrremann/kubectl-eksporter
- Owner: Kyrremann
- License: gpl-3.0
- Created: 2019-08-05T07:29:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-06T18:52:39.000Z (over 2 years ago)
- Last Synced: 2024-08-02T06:14:09.331Z (6 months ago)
- Language: Ruby
- Size: 43.9 KB
- Stars: 23
- Watchers: 4
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-kubectl-plugins - kubectl-eksporter - script to export k8s resources | Resource CRUDs | (kubectl Plugins / Installing plugins via awesome-kubectl-plugins)
README
kubectl-eksporter
==================> A simple Ruby-script to export k8s resources, and removes a pre-defined set of fields for later import
## Usage
```
kubectl eksporter
````-n / --namespace` and other arguments are supported by proxy.
The eksporter also supports piping.
### Command arguments
#### --drop
You can easily remove more fields with the `--drop` argument. List the fields (also nested fields) to be removed.
#### --keep
If you need some of the pre-defined fields, you can list them with `--keep` and they will not be removed.
### Example
```
$ kubectl eksporter ingress testapp
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
labels:
app: testapp
environment: default
name: testapp
spec:
rules:
- host: testapp.local
http:
paths:
- backend:
serviceName: testapp
servicePort: 80
path: "/"
```The following command wil give the same result.
```
$ kubectl get ingress testapp -o yaml | kubectl eksporter
```## Install
First you need install [Krew](https://krew.dev), by following the [installation guide](https://github.com/kubernetes-sigs/krew#installation).
Then just run `kubectl krew install eksporter`
## Why Ruby?
Python didn't have a built-in yaml-converter, and Go is a hassle to work with when you need generic data structures.
## Release
1. Make changes to the code
2. Tag with `git tag -a v1.3.0`
3. New release is automated created and pushed to Krew