Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dustinspecker/kpt-remove-resource
a kpt function for removing a Kubernetes resource
https://github.com/dustinspecker/kpt-remove-resource
function kpt kubernetes kustomize remove
Last synced: 2 days ago
JSON representation
a kpt function for removing a Kubernetes resource
- Host: GitHub
- URL: https://github.com/dustinspecker/kpt-remove-resource
- Owner: dustinspecker
- License: mit
- Created: 2020-05-04T02:06:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-25T23:15:49.000Z (over 4 years ago)
- Last Synced: 2024-06-20T05:27:31.672Z (5 months ago)
- Topics: function, kpt, kubernetes, kustomize, remove
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# kpt-remove-resource
> a [kpt](https://googlecontainertools.github.io/kpt/) function for removing a
Kubernetes resource[![Build Status](https://travis-ci.org/dustinspecker/kpt-remove-resource.svg?branch=master)](https://travis-ci.org/dustinspecker/kpt-remove-resource)
## CLI usage
To use this function via the kpt CLI run the following:
```bash
kpt fn run . --image dustinspecker/kpt-remove-resource:latest -- kind=KIND name=NAME namespace=NAMESPACE
```A kubernetes resource matching the `kind`, `name`, and `namespace` will be removed.
## declarative usage
Create a YAML file with the following content:
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
annotations:
config.kubernetes.io/function: |
container:
image: dustinspecker/kpt-remove-resource:latest
data:
kind: Service
name: ingress-nginx-controller
namespace: ingress-nginx
```and run:
```bash
kpt fn run .
```A kubernetes resource matching the `kind`, `name`, and `namespace` will be removed.