-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: oldthreefeng <louisehong4168@gmail.com>
- Loading branch information
1 parent
3f952ee
commit 69f11c7
Showing
1 changed file
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |