Skip to content

Commit

Permalink
Document KREW_ROOT (#675)
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
  • Loading branch information
ahmetb authored Dec 17, 2020
1 parent c5d05f3 commit c90287c
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion site/content/docs/user-guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@ slug: advanced-configuration
weight: 900
---

### Use a different default index
{{< toc >}}

## Customize installation directory {#custom-install-dir}

By default, Krew installs itself and plugins to `$HOME/.krew`. This means
Krew itself and the installed plugins will be visible only to your user.

To customize this installation path, set the `KREW_ROOT` environment variable
while [installing Krew]({{< relref "setup/install.md" >}}). After Krew is
installed, you still need to set `KREW_ROOT` in your environment for Krew
to be able to find its installation directory.

For example, add this to your `~/.bashrc` or `~/.zshrc` file:

```shell
export KREW_ROOT="/usr/local/krew"
```

Note that you still need to add `$KREW_ROOT/bin` to your `PATH` variable
for `kubectl` to be able to find installed plugins.

## Use a different default index {#custom-default-index}

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

0 comments on commit c90287c

Please sign in to comment.