You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to forcing colors with `--force-colors`, you can also do so by setting the environment variable `KUBECOLOR_FORCE_COLORS=auto`.
15
-
See [Dynamic color support](#dynamic-color-support) section for all possible values.
43
+
See [Dynamic color support](/usage/how-it-works/#dynamic-color-support) section for all possible values.
16
44
17
45
You can use this environment variable to colorize output when you invoke kubecolor in the `watch` command (e.g. `watch kubecolor get pods`).
18
46
Set the following alias:
@@ -27,21 +55,76 @@ watch kubecolor get pods
27
55
28
56
Be sure to include the space at the end to enable alias expansion (without this additional space, the command `watch kgp` would fail, for example).
29
57
30
-
## `KUBECOLOR_LIGHT_BACKGROUND`
58
+
## `NO_COLOR`
59
+
60
+
Coloring is disabled if `NO_COLOR` is set to any non-empty value.
61
+
This is equivalent to the `--plain` or `--force-colors=none` command-line flags.
62
+
63
+
```bash
64
+
# These disable coloring
65
+
export NO_COLOR=1
66
+
export NO_COLOR="no"
67
+
export NO_COLOR="yes"
68
+
export NO_COLOR="Lorem ipsum"
69
+
70
+
# These revert to kubecolor's default coloring logic
71
+
export NO_COLOR=""
72
+
unset NO_COLOR
73
+
```
74
+
75
+
## `KUBECOLOR_PRESET`
76
+
77
+
Changes which color theme kubecolor uses.
78
+
Defaults to `dark`
79
+
80
+
```bash
81
+
export KUBECOLOR_PRESET="dark"# default
82
+
export KUBECOLOR_PRESET="light"
83
+
export KUBECOLOR_PRESET="protanopia-dark"
84
+
```
85
+
86
+
See: [Customizing / Color themes](/customizing/themes/#switching-to-a-different-color-theme)
87
+
88
+
## `KUBECOLOR_PAGING`
89
+
90
+
Whether to pipe supported subcommands to a pager.
91
+
Valid values: `auto` or `never`.
92
+
Defaults to `never`.
93
+
94
+
```bash
95
+
export KUBECOLOR_PAGING="auto"
96
+
export KUBECOLOR_PAGING="never"# default
97
+
```
98
+
99
+
## `KUBECOLOR_PAGER`
100
+
101
+
Sets which pager application to use.
102
+
Defaults to `$PAGER`, `less`, or `more` (depending on which are available)
103
+
104
+
```bash
105
+
export KUBECOLOR_PAGER="less"
106
+
```
107
+
108
+
## `PAGER`
31
109
32
-
In addition to use the light color preset with `--light-background`, you can also do so by setting the environment variable `KUBECOLOR_LIGHT_BACKGROUND=true`.
110
+
Sets which pager application to use. Used as a default if `KUBECOLOR_PAGER`
111
+
environment variable, the `pager` config, or `--pager` flag are unset.
112
+
113
+
```bash
114
+
export PAGER="less"
115
+
```
33
116
34
117
## Theme variables
35
118
36
119
| Environment variable | Type | Description | Dark theme
| `KUBECOLOR_THEME_BASE_DANGER` | color | general color for when things are bad | `red`
38
122
| `KUBECOLOR_THEME_BASE_INFO` | color | general color for when things are informational | `white`
123
+
| `KUBECOLOR_THEME_BASE_MUTED` | color | general color for when things are less relevant | `gray:italic`
39
124
| `KUBECOLOR_THEME_BASE_PRIMARY` | color | general color for when things are focus | `magenta`
40
125
| `KUBECOLOR_THEME_BASE_SECONDARY` | color | general color for when things are secondary focus | `cyan`
41
126
| `KUBECOLOR_THEME_BASE_SUCCESS` | color | general color for when things are good | `green`
42
127
| `KUBECOLOR_THEME_BASE_WARNING` | color | general color for when things are wrong | `yellow`
43
-
| `KUBECOLOR_THEME_BASE_DANGER` | color | general color for when things are bad | `red`
44
-
| `KUBECOLOR_THEME_BASE_MUTED` | color | general color for when things are less relevant | `gray:italic`
45
128
| `KUBECOLOR_THEME_BASE_KEY` | color[] | general color for keys<br/>*(fallback to `[KUBECOLOR_THEME_BASE_SECONDARY]`)* | `hicyan / cyan`
46
129
||||
47
130
| `KUBECOLOR_THEME_DEFAULT` | color | default when no specific mapping is found for the command | `green`
@@ -80,6 +163,7 @@ In addition to use the light color preset with `--light-background`, you can als
80
163
| `KUBECOLOR_THEME_APPLY_CREATED` | color | used on "deployment.apps/foo created"<br/>*(fallback to `KUBECOLOR_THEME_BASE_SUCCESS`)* | `green`
81
164
| `KUBECOLOR_THEME_APPLY_CONFIGURED` | color | used on "deployment.apps/bar configured"<br/>*(fallback to `KUBECOLOR_THEME_BASE_WARNING`)* | `yellow`
82
165
| `KUBECOLOR_THEME_APPLY_UNCHANGED` | color | used on "deployment.apps/quux unchanged"<br/>*(fallback to `KUBECOLOR_THEME_BASE_PRIMARY`)* | `magenta`
166
+
| `KUBECOLOR_THEME_APPLY_SERVERSIDE` | color | used on "deployment.apps/quux serverside-applied"<br/>*(fallback to `KUBECOLOR_THEME_BASE_WARNING`)* | `yellow`
83
167
| `KUBECOLOR_THEME_APPLY_DRYRUN` | color | used on "(dry run)" and "(server dry run)"<br/>*(fallback to `KUBECOLOR_THEME_BASE_SECONDARY`)* | `cyan`
84
168
| `KUBECOLOR_THEME_APPLY_FALLBACK` | color | used when outputs unknown format<br/>*(fallback to `KUBECOLOR_THEME_BASE_SUCCESS`)* | `green`
85
169
||||
@@ -149,4 +233,37 @@ In addition to use the light color preset with `--light-background`, you can als
149
233
| `KUBECOLOR_THEME_LOGS_SEVERITY_ERROR` | color | *(fallback to `KUBECOLOR_THEME_BASE_DANGER`)* | `red`
150
234
| `KUBECOLOR_THEME_LOGS_SEVERITY_FATAL` | color | *(fallback to `KUBECOLOR_THEME_BASE_DANGER`)* | `red`
151
235
| `KUBECOLOR_THEME_LOGS_SEVERITY_PANIC` | color | *(fallback to `KUBECOLOR_THEME_BASE_DANGER`)* | `red`
236
+
||||
237
+
| `KUBECOLOR_THEME_DIFF_ADDED` | color | used on added lines<br/>*(fallback to `KUBECOLOR_THEME_BASE_SUCCESS`)* | `green`
238
+
| `KUBECOLOR_THEME_DIFF_REMOVED` | color | used on removed lines<br/>*(fallback to `KUBECOLOR_THEME_BASE_DANGER`)* | `red`
239
+
| `KUBECOLOR_THEME_DIFF_UNCHANGED` | color | used on unchanged lines<br/>*(fallback to `KUBECOLOR_THEME_BASE_MUTED`)* | `gray:italic`
240
+
241
+
## Deprecated flags
242
+
243
+
:::caution
244
+
Deprecated: these environment variables are kept for backwards compatibility and
245
+
but may be removed in a future version.
246
+
:::
247
+
248
+
### `KUBECTL_COMMAND`
249
+
250
+
Changes which `kubectl` command to run.
251
+
252
+
```bash
253
+
export KUBECTL_COMMAND=kubectl # default
254
+
export KUBECTL_COMMAND=kubectl1.19
255
+
export KUBECTL_COMMAND=oc # openshift
256
+
```
257
+
258
+
Please use `KUBECOLOR_KUBECTL=kubectl` instead.
259
+
260
+
### `KUBECOLOR_LIGHT_BACKGROUND`
261
+
262
+
In addition to use the light color preset with `--light-background`.
0 commit comments