Skip to content

Commit

Permalink
doc: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Telemaco019 committed May 19, 2024
1 parent e075be8 commit a7a725c
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 4 deletions.
52 changes: 51 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,65 @@
# Duplik8s

🚧 Work in progress!

---

**Duplicate** 🔁 kubectl plugin to duplicate resources in a Kubernetes cluster.

<p>
<a href="https://github.com/Telemaco019/duplik8s/releases"><img src="https://img.shields.io/github/release/Telemaco019/duplik8s.svg" alt="Latest Release"></a>
<a href="https://github.com/Telemaco019/duplik8s/actions"><img src="https://github.com/Telemaco019/duplik8s/actions/workflows/ci.yaml/badge.svg" alt="Build Status"></a>
</p>

---

![](./docs/demo.gif)

`duplik8s` allows you to easily duplicate Kubernetes pods with overridden commands and configurations.
This is useful for testing, debugging, and development purposes.

As you might have guessed, `duplik8s` shines when used in combination with the
amazing [k9s](https://github.com/derailed/k9s) ✨.
Check out the installation instructions below to easily load it as a k9s plugin.

## Installation

### Install with Go

```sh
$ go install github.com/Telemaco019/duplik8s@latest
$ go install github.com/telemaco019/duplik8s/cmd@latest
```

### Use as k9s plugin

After installing `duplik8s`, you can add it to your k9s plugins by adding the following to
your `$XDG_CONFIG_HOME/k9s/plugins.yml` file.

After reloading k9s, you should be able to duplicate Pods with `Ctrl-T`.

```yaml
# $XDG_CONFIG_HOME/k9s/plugins.yaml
plugins:
duplik8s:
shortCut: Ctrl-T
description: Duplicate Pod
scopes:
- po
command: kubectl
background: true
args:
- duplicate
- pod
- $NAME
- -n
- $NAMESPACE
- --context
- $CONTEXT
```
On MacOS, you can find the `plugins.yml` file at `~/Library/Application Support/k9s/plugins.yaml`.

For more information on k9s plugins, you can refer to the [official documentation](https://k9scli.io/topics/plugins).

## Examples

Expand All @@ -26,3 +69,10 @@ Duplicate a Pod:
$ kubectl duplicate pod my-pod
```


---

## License

This project is licensed under the Apache License. See the [LICENSE](./LICENSE) file for details.

File renamed without changes.
Binary file modified docs/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions docs/demo.tape
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ Type "k9s"
Enter
Sleep 3s
Ctrl+T
Sleep 5s
Sleep 3s
Type "j"
Sleep 2s
Sleep 3s
Type "s"
Sleep 1s
Type "ls"
Enter
Sleep 2s
Type "exit"
Sleep 5s

0 comments on commit a7a725c

Please sign in to comment.