Skip to content

Commit

Permalink
add readme (#2)
Browse files Browse the repository at this point in the history
Signed-off-by: oldthreefeng <louisehong4168@gmail.com>
  • Loading branch information
oldthreefeng authored Jun 25, 2021
1 parent 3f952ee commit 69f11c7
Showing 1 changed file with 60 additions and 3 deletions.
63 changes: 60 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
### Usage
## kubectl-cns

copy kubectl-cns to you path and you can
kubectl-cns is a kubectl plugin that clean the namespace quickly.

```kubectl cns aaa dddd```
This plugin has been tested to work with following delete types:

- Delete Active namespace
- Delete multi Active namespace
- Delete Terminating namespace
- Delete multi Terminating namespace

## Build

if you have go env. build yourself. or [download](https://github.com/cuisongliu/kubectl-cns/releases)


```
git clone git@github.com:cuisongliu/kubectl-cns.git
go build .
cp kubectl-cns $YOUR_PATH
```

## Usage

Binary Use

```
# delete an tx namespace
kubectl-cns tx
# delete an tx namespace by force
kubectl-cns tx --force
# delete some namespaces like tx, staging
kubectl-cns tx staging
# delete some namespaces like tx, staging , qa by force
kubect-cns tx staging qa --force
```

As Plugin Use

```
# delete an tx namespace
kubectl cns tx
# delete an tx namespace by force
kubectl cns tx --force
# delete some namespaces like tx, staging
kubectl cns tx staging
# delete some namespaces like tx, staging , qa by force
kubectl cns tx staging qa --force
```

0 comments on commit 69f11c7

Please sign in to comment.