Skip to content

Commit 94656ba

Browse files
robot-headbomgar
authored andcommitted
Add context to kubectl call for people who don't set active contexts
For safety, some people prefer to keep their `kubectl` active context blank, and invoke `k9s` with `--context`. This extends the example to support this usecase as well as the default.
1 parent a84a62a commit 94656ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ plugins:
207207
background: false
208208
args:
209209
- -c
210-
- "kubectl logs --follow -n $NAMESPACE $NAME | fblog"
210+
- "kubectl logs --follow -n $NAMESPACE $NAME --context $CONTEXT | fblog"
211211
fblog-container:
212212
shortCut: Shift-L
213213
confirm: false
@@ -218,7 +218,7 @@ plugins:
218218
background: false
219219
args:
220220
- -c
221-
- "kubectl logs --follow -n $NAMESPACE $POD -c $NAME | fblog"
221+
- "kubectl logs --follow -n $NAMESPACE $POD -c $NAME --context $CONTEXT | fblog"
222222
fblog-pod-all:
223223
shortCut: Shift-K
224224
confirm: false
@@ -229,7 +229,7 @@ plugins:
229229
background: false
230230
args:
231231
- -c
232-
- "kubectl logs --follow -n $NAMESPACE $NAME | fblog -d"
232+
- "kubectl logs --follow -n $NAMESPACE $NAME --context $CONTEXT | fblog -d"
233233
fblog-container-all:
234234
shortCut: Shift-K
235235
confirm: false
@@ -240,5 +240,5 @@ plugins:
240240
background: false
241241
args:
242242
- -c
243-
- "kubectl logs --follow -n $NAMESPACE $POD -c $NAME | fblog -d"
243+
- "kubectl logs --follow -n $NAMESPACE $POD -c $NAME --context $CONTEXT | fblog -d"
244244
```

0 commit comments

Comments
 (0)