1- # Migration Guide: kubenow v1. x → v2.0
1+ # Migration Guide: kubenow v0.1. x → v0.2+
22
3- This guide helps you migrate from kubenow v1. x to v2.0 .
3+ This guide helps you migrate from kubenow v0.1. x to v0.2+ .
44
55---
66
77## Overview
88
9- ** v2.0 introduces a new Cobra-based CLI structure** with subcommands instead of the ` --mode ` flag. This breaking change provides better organization, improved help text, and consistency with the spectre tools family.
9+ ** v0.2 introduced a new Cobra-based CLI structure** with subcommands instead of the ` --mode ` flag. This breaking change provides better organization, improved help text, and consistency with the spectre tools family.
1010
1111** Migration Difficulty:** Low
1212** Estimated Time:** 5-10 minutes to update scripts
@@ -21,74 +21,74 @@ The `--mode` flag has been removed. Each mode is now a dedicated subcommand.
2121
2222#### Incident Mode
2323
24- ** Before (v1 .x):**
24+ ** Before (v0.1 .x):**
2525``` bash
2626kubenow --mode incident --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
2727```
2828
29- ** After (v2.0 ):**
29+ ** After (v0.2+ ):**
3030``` bash
3131kubenow incident --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
3232```
3333
3434#### Pod Mode
3535
36- ** Before (v1 .x):**
36+ ** Before (v0.1 .x):**
3737``` bash
3838kubenow --mode pod --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
3939```
4040
41- ** After (v2.0 ):**
41+ ** After (v0.2+ ):**
4242``` bash
4343kubenow pod --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
4444```
4545
4646#### Teamlead Mode
4747
48- ** Before (v1 .x):**
48+ ** Before (v0.1 .x):**
4949``` bash
5050kubenow --mode teamlead --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
5151```
5252
53- ** After (v2.0 ):**
53+ ** After (v0.2+ ):**
5454``` bash
5555kubenow teamlead --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
5656```
5757
5858#### Compliance Mode
5959
60- ** Before (v1 .x):**
60+ ** Before (v0.1 .x):**
6161``` bash
6262kubenow --mode compliance --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
6363```
6464
65- ** After (v2.0 ):**
65+ ** After (v0.2+ ):**
6666``` bash
6767kubenow compliance --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
6868```
6969
7070#### Chaos Mode
7171
72- ** Before (v1 .x):**
72+ ** Before (v0.1 .x):**
7373``` bash
7474kubenow --mode chaos --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
7575```
7676
77- ** After (v2.0 ):**
77+ ** After (v0.2+ ):**
7878``` bash
7979kubenow chaos --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
8080```
8181
8282#### Default Mode
8383
84- ** Before (v1 .x):**
84+ ** Before (v0.1 .x):**
8585``` bash
8686kubenow --mode default --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
8787# or just
8888kubenow --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
8989```
9090
91- ** After (v2.0 ):**
91+ ** After (v0.2+ ):**
9292``` bash
9393kubenow default --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
9494```
@@ -99,12 +99,12 @@ kubenow default --llm-endpoint http://localhost:11434/v1 --model mixtral:8x22b
9999
100100** Global flags** (like ` --kubeconfig ` , ` --namespace ` , ` --verbose ` ) must now appear ** before** the subcommand.
101101
102- ** Before (v1 .x):**
102+ ** Before (v0.1 .x):**
103103``` bash
104104kubenow --mode incident --namespace production --llm-endpoint ...
105105```
106106
107- ** After (v2.0 ):**
107+ ** After (v0.2+ ):**
108108``` bash
109109kubenow --namespace production incident --llm-endpoint ...
110110```
@@ -126,9 +126,9 @@ kubenow pod --namespace prod --llm-endpoint ...
126126
127127### 3. Exit Codes
128128
129- v2.0 uses standardized exit codes across all commands.
129+ v0.2+ uses standardized exit codes across all commands.
130130
131- | Exit Code | Meaning | v1. x Behavior | v2.0 Behavior |
131+ | Exit Code | Meaning | v0.1. x Behavior | v0.2+ Behavior |
132132| -----------| ---------| ---------------| ---------------|
133133| 0 | Success | Same | Same |
134134| 1 | Policy failure | Used for all errors | Reserved (not used yet) |
@@ -141,12 +141,12 @@ v2.0 uses standardized exit codes across all commands.
141141
142142### 4. Help Command
143143
144- ** Before (v1 .x):**
144+ ** Before (v0.1 .x):**
145145``` bash
146146kubenow --help
147147```
148148
149- ** After (v2.0 ):**
149+ ** After (v0.2+ ):**
150150``` bash
151151kubenow --help # Show all commands
152152kubenow incident --help # Show incident command help
@@ -156,7 +156,7 @@ kubenow analyze requests-skew --help # Show requests-skew help
156156
157157---
158158
159- ## New Features in v2.0
159+ ## New Features in v0.2+
160160
161161### Deterministic Analysis Commands
162162
@@ -200,18 +200,18 @@ kubenow analyze node-footprint --prometheus-url http://prometheus:9090
200200- [ ] Replace ` --mode ` flag with subcommand
201201- [ ] Move global flags before subcommand
202202- [ ] Update exit code handling (if checking exit codes)
203- - [ ] Test all scripts with v2.0
203+ - [ ] Test all scripts with v0.2+
204204
205205### For CI/CD Pipelines
206206
207- - [ ] Update kubenow installation (download v2.0 binary)
207+ - [ ] Update kubenow installation (download v0.2+ binary)
208208- [ ] Update command syntax in pipeline scripts
209209- [ ] Verify exit code handling
210210- [ ] Test pipeline end-to-end
211211
212212### For Kubernetes Jobs/CronJobs
213213
214- - [ ] Update container image to v2.0
214+ - [ ] Update container image to v0.2+
215215- [ ] Update command in pod spec
216216- [ ] Test job execution
217217
@@ -221,7 +221,7 @@ kubenow analyze node-footprint --prometheus-url http://prometheus:9090
221221
222222### Example 1: Simple Script
223223
224- ** Before (v1 .x):**
224+ ** Before (v0.1 .x):**
225225``` bash
226226#! /bin/bash
227227kubenow \
@@ -236,7 +236,7 @@ if [ $? -ne 0 ]; then
236236fi
237237```
238238
239- ** After (v2.0 ):**
239+ ** After (v0.2+ ):**
240240``` bash
241241#! /bin/bash
242242kubenow incident \
258258
259259### Example 2: Kubernetes CronJob
260260
261- ** Before (v1 .x):**
261+ ** Before (v0.1 .x):**
262262``` yaml
263263apiVersion : batch/v1
264264kind : CronJob
@@ -285,7 +285,7 @@ spec:
285285 - /reports/compliance-report.json
286286` ` `
287287
288- **After (v2.0 ):**
288+ **After (v0.2+ ):**
289289` ` ` yaml
290290apiVersion : batch/v1
291291kind : CronJob
@@ -315,7 +315,7 @@ spec:
315315
316316### Example 3: Watch Mode
317317
318- **Before (v1 .x):**
318+ **Before (v0.1 .x):**
319319` ` ` bash
320320kubenow \
321321 --mode incident \
@@ -325,7 +325,7 @@ kubenow \
325325 --model mixtral:8x22b
326326```
327327
328- ** After (v2.0 ):**
328+ ** After (v0.2+ ):**
329329``` bash
330330kubenow incident \
331331 --watch-interval 1m \
@@ -338,7 +338,7 @@ kubenow incident \
338338
339339### Example 4: With Filters
340340
341- ** Before (v1 .x):**
341+ ** Before (v0.1 .x):**
342342``` bash
343343kubenow \
344344 --mode pod \
@@ -349,7 +349,7 @@ kubenow \
349349 --model mixtral:8x22b
350350```
351351
352- ** After (v2.0 ):**
352+ ** After (v0.2+ ):**
353353``` bash
354354kubenow --namespace production pod \
355355 --include-pods " payment-*,checkout-*" \
@@ -407,30 +407,30 @@ echo $? # Should be 2
407407
408408## Rollback Plan
409409
410- If you need to roll back to v1 .x:
410+ If you need to roll back to v0.1 .x:
411411
412412### Option 1: Keep Both Versions
413413
414414``` bash
415- # Rename v2.0 binary
415+ # Rename v0.2+ binary
416416mv /usr/local/bin/kubenow /usr/local/bin/kubenow2
417417
418- # Install v1 .x as kubenow
418+ # Install v0.1 .x as kubenow
419419curl -LO https://github.com/ppiankov/kubenow/releases/download/v1.2.0/kubenow_1.2.0_linux_amd64.tar.gz
420420tar -xzf kubenow_1.2.0_linux_amd64.tar.gz
421421sudo mv kubenow /usr/local/bin/
422422
423- # Use v1 .x: kubenow
424- # Use v2.0 : kubenow2
423+ # Use v0.1 .x: kubenow
424+ # Use v0.2+ : kubenow2
425425```
426426
427427### Option 2: Downgrade
428428
429429``` bash
430- # Remove v2.0
430+ # Remove v0.2+
431431rm /usr/local/bin/kubenow
432432
433- # Install v1 .x
433+ # Install v0.1 .x
434434curl -LO https://github.com/ppiankov/kubenow/releases/download/v1.2.0/kubenow_1.2.0_linux_amd64.tar.gz
435435tar -xzf kubenow_1.2.0_linux_amd64.tar.gz
436436sudo mv kubenow /usr/local/bin/
@@ -450,20 +450,20 @@ sudo mv kubenow /usr/local/bin/
450450
451451## FAQ
452452
453- ** Q: Can I use both v1. x and v2.0 side by side?**
453+ ** Q: Can I use both v0.1. x and v0.2+ side by side?**
454454A: Yes, install them as separate binaries (` kubenow ` and ` kubenow2 ` ).
455455
456- ** Q: Will v1 .x continue to receive updates?**
457- A: No, v1. x is end-of-life. All future development is on v2.x .
456+ ** Q: Will v0.1 .x continue to receive updates?**
457+ A: No, v0.1. x is end-of-life. All future development is on v0.2+ .
458458
459459** Q: Do I need to migrate immediately?**
460- A: We recommend migrating within 30 days. v1 .x will not receive security updates.
460+ A: We recommend migrating within 30 days. v0.1 .x will not receive security updates.
461461
462462** Q: Are there any feature differences besides CLI syntax?**
463- A: v2.0 adds new ` analyze ` commands. All v1 .x LLM features remain unchanged.
463+ A: v0.2+ adds new ` analyze ` commands. All v0.1 .x LLM features remain unchanged.
464464
465465** Q: Will my old scripts break?**
466- A: Yes, if you don't update them. The ` --mode ` flag no longer exists in v2.0 .
466+ A: Yes, if you don't update them. The ` --mode ` flag no longer exists in v0.2+ .
467467
468468** Q: Can I automate the migration?**
469469A: Yes, with sed/awk:
@@ -474,4 +474,4 @@ sed -i 's/kubenow --mode incident/kubenow incident/g' my-script.sh
474474
475475---
476476
477- ** Migration complete? Welcome to kubenow v2.0 !** 🎉
477+ ** Migration complete? Welcome to kubenow v0.2+ !** 🎉
0 commit comments