mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 04:54:18 +02:00
enhanced default cluster selection, add 'cluster switch', overhaul json header setting (#47)
This commit is contained in:
33
README.md
33
README.md
@@ -80,6 +80,7 @@ ccr - manage cross cluster replication
|
||||
info - show ccr remote info
|
||||
cluster - manage cluster[s]
|
||||
status - show cluster status
|
||||
switch - set current elasticsearch cluster
|
||||
list - list configured clusters
|
||||
settings - cluster settings management
|
||||
list - show cluster settings
|
||||
@@ -158,7 +159,7 @@ Or create a config file such as this:
|
||||
|
||||
```yaml
|
||||
clusters:
|
||||
default:
|
||||
foobar:
|
||||
uri: https://es.foo.bar:9200/
|
||||
user: elastic
|
||||
pass: 123456
|
||||
@@ -172,9 +173,37 @@ and specify it with `-c configfile`. You may also put clusters into a
|
||||
default config file in `~/.config/esctl/config.yaml`. In this case you
|
||||
can omit `-c ...`.
|
||||
|
||||
If you want to work on a specific cluster, specify its name with the
|
||||
If you want to work on a specific cluster, you need to make it the
|
||||
current default one. You can either manually configure it in the
|
||||
config:
|
||||
|
||||
```yaml
|
||||
clusters:
|
||||
foobar:
|
||||
uri: https://es.foo.bar:9200/
|
||||
user: elastic
|
||||
pass: 123456
|
||||
default: true
|
||||
```
|
||||
|
||||
or - if the cluster already exists in the config - issue this command:
|
||||
|
||||
```console
|
||||
esctl cluster switch foobar
|
||||
```
|
||||
|
||||
You may also temporary set a cluster as the current default with the
|
||||
global `-C` option.
|
||||
|
||||
The following rules apply for default cluster selection:
|
||||
|
||||
1. If there's just one cluster configured (either via environment
|
||||
variables or config), this one will be selected.
|
||||
2. If there is one cluster configured with the `default` flag `true`,
|
||||
use this one.
|
||||
|
||||
Use `esctl cluster ls` to check status and see which one would be used.
|
||||
|
||||
## Installation
|
||||
|
||||
The tool does not have any dependencies. Just download the binary for
|
||||
|
||||
Reference in New Issue
Block a user