Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.