diff --git a/README.md b/README.md index 560dbdf..31b4427 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Features: - shed-init [📚](docs/directory-init.d-shed-init.md) - when the shell session started. - shed-use [📚](docs/directory-init.d-shed-use.md)- when switch to different Shed using command `shed-use`[📚](docs/shed-use.md). - shed-kubeconfig-use [📚](docs/directory-init.d-shed-kubeconfig-use.md) - when switch to different KubeConfig using commands `shed-kubeconfig-use` [📚](docs/shed-kubeconfig-use.md), `c0`, `c1`, `c2`, `c3`, `c4`. -- Support `kubectl` with shortened alias, ie `k`[📚](docs/shed-kubectl.md), `k-sh`[📚](docs/shed-kubectl-exec-sh.md), `k-bash`[📚](docs/shed-kubectl-exec-bash.md), `k-scale`[📚](docs/shed-kubectl-scale.md), `k-logs-f`[📚](docs/shed-kubectl-logs-follow.md), `k-logs-p`[📚](docs/shed-kubectl-logs-previous.md), `ka`[📚](docs/shed-kubectl-apply.md), kd, k-secret-decode. +- Support `kubectl` with shortened alias, ie `k`[📚](docs/shed-kubectl.md), `k-sh`[📚](docs/shed-kubectl-exec-sh.md), `k-bash`[📚](docs/shed-kubectl-exec-bash.md), `k-scale`[📚](docs/shed-kubectl-scale.md), `k-logs-f`[📚](docs/shed-kubectl-logs-follow.md), `k-logs-p`[📚](docs/shed-kubectl-logs-previous.md), `ka`[📚](docs/shed-kubectl-apply.md), `kd`[📚](shed-kubectl-delete.md), k-secret-decode. - Support `helm` with shortened alias, ie `h`[📚](docs/shed-helm.md). - Support `istioctl` with shortened alias, ie `i`[📚](docs/shed-istioctl.md). - Print out the actual command that is executing. diff --git a/docs/directory-kubectl-resources.md b/docs/directory-kubectl-resources.md index 168607d..5f7b7f8 100644 --- a/docs/directory-kubectl-resources.md +++ b/docs/directory-kubectl-resources.md @@ -12,4 +12,4 @@ User defined kubectl resources that will be executed by `shed-kubectl-apply` and ## SEE ALSO -[shed-kubectl-resources](shed-kubectl-resources.md), [shed-kubectl-apply](shed-kubectl-apply.md) +[shed-kubectl-resources](shed-kubectl-resources.md), [shed-kubectl-apply](shed-kubectl-apply.md), [shed-kubectl-delete](shed-kubectl-delete.md) diff --git a/docs/documentation.md b/docs/documentation.md index 3d463e9..a0a1791 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -28,7 +28,7 @@ | `shed` | | bin | ✅ | [📚 Doc](shed.md) | | `shed-kubectl-resources` | | bin | ✅ | [📚 Doc](shed-kubectl-resources.md) | | `shed-kubectl-apply` | `ka` | bin | ✅ | [📚 Doc](shed-kubectl-apply.md) | -| `shed-kubectl-delete` | `kd` | bin | ✅ | ❌ | +| `shed-kubectl-delete` | `kd` | bin | ✅ | [📚 Doc](shed-kubectl-delete.md) | | `shed-version` | | bin | ✅ | [📚 Doc](shed-version.md) | | `shed-kubectl-secret-decode` | `k-secret-decode` | bin | ✅ | ❌ | diff --git a/docs/shed-kubectl-apply.md b/docs/shed-kubectl-apply.md index 29a6427..13b7bed 100644 --- a/docs/shed-kubectl-apply.md +++ b/docs/shed-kubectl-apply.md @@ -20,4 +20,4 @@ pod/hello-world created ## SEE ALSO -[shed-kubectl-resources](shed-kubectl-resources.md), [~/.shed/kubectl-resources](directory-kubectl-resources.md) +[shed-kubectl-delete](shed-kubectl-delete.md), [shed-kubectl-resources](shed-kubectl-resources.md), [~/.shed/kubectl-resources](directory-kubectl-resources.md) diff --git a/docs/shed-kubectl-delete.md b/docs/shed-kubectl-delete.md new file mode 100644 index 0000000..1c0d2c9 --- /dev/null +++ b/docs/shed-kubectl-delete.md @@ -0,0 +1,23 @@ +# shed-kubectl-delete + +Delete the resources based on resource located in directory set in environment variable `SHED_CONFIG_DIRECTORY_RESOURCES`. + +## SYNOPSIS + +```bash +shed-kubectl-delete kubectl-resource +shed kubectl-delete kubectl-resource +kd kubectl-resource +``` + +## EXAMPLES + +```bash +$shed-kubectl-delete hello-world ++ kubectl -context kube-dev-1 delete -f /home/user1/.shed/kubectl-resources/hello-world +pod/hello-world deleted +``` + +## SEE ALSO + +[shed-kubectl-apply](shed-kubectl-apply.md), [shed-kubectl-resources](shed-kubectl-resources.md), [~/.shed/kubectl-resources](directory-kubectl-resources.md) diff --git a/docs/shed-kubectl-resources.md b/docs/shed-kubectl-resources.md index 038b180..e2e61d6 100644 --- a/docs/shed-kubectl-resources.md +++ b/docs/shed-kubectl-resources.md @@ -17,4 +17,4 @@ hello-world ## SEE ALSO -[shed-kubectl-apply](shed-kubectl-apply.md), [~/.shed/kubectl-resources](directory-kubectl-resources.md) \ No newline at end of file +[shed-kubectl-apply](shed-kubectl-apply.md), [shed-kubectl-delete](shed-kubectl-delete.md), [~/.shed/kubectl-resources](directory-kubectl-resources.md) \ No newline at end of file diff --git a/docs/shed-kubectl.md b/docs/shed-kubectl.md index a873a55..7513441 100644 --- a/docs/shed-kubectl.md +++ b/docs/shed-kubectl.md @@ -19,4 +19,4 @@ k [kubectl arguments] [shed-config](shed-config.md), [shed-use](shed-use.md), [shed-kubeconfig-use](shed-kubeconfig-use.md), [shed-helm](shed-helm.md), [shed-istioctl](shed-istioctl.md)\ [shed-kubectl-exec-sh](shed-kubectl-exec-sh.md), [shed-kubectl-exec-bash](shed-kubectl-exec-bash.md), [shed-kubectl-scale](shed-kubectl-scale.md)\ -[shed-kubectl-resources](shed-kubectl-resources.md) +[shed-kubectl-resources](shed-kubectl-resources.md), [shed-kubectl-apply](shed-kubectl-apply.md), [shed-kubectl-delete](shed-kubectl-delete.md) diff --git a/docs/shed.md b/docs/shed.md index 539b3cf..ebba05f 100644 --- a/docs/shed.md +++ b/docs/shed.md @@ -35,5 +35,5 @@ shed is a program that provides alternate way to run shed programs. | `shed-contexts` | `shed contexts` | `sc` | [📚 Doc](shed-contexts.md) | | `shed-kubectl-resources` | `shed kubectl-resources` | | [📚 Doc](shed-kubectl-resources.md) | | `shed-kubectl-apply` | `shed kubectl-apply` | `ka` | [📚 Doc](shed-kubectl-apply.md) | -| `shed-kubectl-delete` | `shed kubectl-delete` | `kd` | ❌ | +| `shed-kubectl-delete` | `shed kubectl-delete` | `kd` | [📚 Doc](shed-kubectl-delete.md) | | `shed-version` | `shed version` | | [📚 Doc](shed-version.md) |