@@ -55,6 +55,27 @@ kubectl mft dump -t localhost:5000/myapp/config:v1.0.0 | kubectl apply -f -
5555
5656## Installation
5757
58+ ### Using Krew (Recommended)
59+
60+ [ Krew] ( https://krew.sigs.k8s.io/ ) is the plugin manager for kubectl.
61+
62+ ``` bash
63+ # Add the custom index
64+ kubectl krew index add mft https://github.com/chez-shanpu/kubectl-mft.git
65+
66+ # Install kubectl-mft
67+ kubectl krew install mft/mft
68+
69+ # Verify installation
70+ kubectl mft --help
71+ ```
72+
73+ To update:
74+
75+ ``` bash
76+ kubectl krew upgrade mft/mft
77+ ```
78+
5879### Download Binary from GitHub Releases
5980
6081Download the latest release for your platform from [ GitHub Releases] ( https://github.com/chez-shanpu/kubectl-mft/releases ) .
@@ -69,7 +90,7 @@ curl -L https://github.com/chez-shanpu/kubectl-mft/releases/download/VERSION/kub
6990sudo mv kubectl-mft /usr/local/bin/
7091
7192# Verify installation
72- kubectl mft version
93+ kubectl mft --help
7394```
7495
7596** Windows**
@@ -164,6 +185,16 @@ kubectl mft delete -t localhost:5000/myapp:v1.0.0 --force
164185kubectl mft dump -t ghcr.io/myorg/manifests:v1.0.0 -o my-manifest.yaml
165186```
166187
188+ ** Copy a manifest to a new tag**
189+
190+ ``` bash
191+ # Copy within the same repository
192+ kubectl mft cp ghcr.io/myorg/manifests:v1.0.0 ghcr.io/myorg/manifests:latest
193+
194+ # Copy to a different repository
195+ kubectl mft cp ghcr.io/myorg/manifests:v1.0.0 ghcr.io/myorg/prod-manifests:v1.0.0
196+ ```
197+
167198## Command Reference
168199
169200| Command | Description |
@@ -175,6 +206,7 @@ kubectl mft dump -t ghcr.io/myorg/manifests:v1.0.0 -o my-manifest.yaml
175206| ` list ` | List all locally stored manifests |
176207| ` path ` | Get the file path to a manifest blob |
177208| ` delete ` | Delete a manifest from local storage |
209+ | ` cp ` | Copy a manifest to a new tag in local storage |
178210
179211For detailed usage of each command, run ` kubectl mft <command> --help ` .
180212
0 commit comments