Skip to content

Commit c90287c

Browse files
authored
Document KREW_ROOT (#675)
Signed-off-by: Ahmet Alp Balkan <[email protected]>
1 parent c5d05f3 commit c90287c

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

site/content/docs/user-guide/configuration.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,28 @@ slug: advanced-configuration
44
weight: 900
55
---
66

7-
### Use a different default index
7+
{{< toc >}}
8+
9+
## Customize installation directory {#custom-install-dir}
10+
11+
By default, Krew installs itself and plugins to `$HOME/.krew`. This means
12+
Krew itself and the installed plugins will be visible only to your user.
13+
14+
To customize this installation path, set the `KREW_ROOT` environment variable
15+
while [installing Krew]({{< relref "setup/install.md" >}}). After Krew is
16+
installed, you still need to set `KREW_ROOT` in your environment for Krew
17+
to be able to find its installation directory.
18+
19+
For example, add this to your `~/.bashrc` or `~/.zshrc` file:
20+
21+
```shell
22+
export KREW_ROOT="/usr/local/krew"
23+
```
24+
25+
Note that you still need to add `$KREW_ROOT/bin` to your `PATH` variable
26+
for `kubectl` to be able to find installed plugins.
27+
28+
## Use a different default index {#custom-default-index}
829

930
When Krew is installed, it automatically initializes an index named `default`
1031
pointing to the [krew-index][ki] repository. You can force Krew to use a

0 commit comments

Comments
 (0)