Skip to content

Instantly share code, notes, and snippets.

@MaxenceG2M
Created July 30, 2021 20:32
Show Gist options
  • Save MaxenceG2M/45e57f542e9ebc2dfbe7951758309929 to your computer and use it in GitHub Desktop.
Save MaxenceG2M/45e57f542e9ebc2dfbe7951758309929 to your computer and use it in GitHub Desktop.
Elasticsearch requests to do rolling update
PUT /_settings
{
"index": {
"number_of_replicas": 1
}
}
// https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html
PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": "primaries"
}
}
POST _flush/synced
GET _cat/nodes
GET _cat/health?v=true
PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": null
}
}
// https://www.elastic.co/guide/en/elasticsearch/reference/current/add-elasticsearch-nodes.html
POST /_cluster/voting_config_exclusions?node_names=enedis
GET /_cluster/state?filter_path=metadata.cluster_coordination.voting_config_exclusions
PUT /_settings
{
"index": {
"number_of_replicas": 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment