Here's a really simple one. When you decide to remove an Elasticsearch node, either because it's having trouble or in need of an update, it's best to proactively shift shards off of that node, so there's no hit to the cluster or risk of dataloss when it's removed. To tell shards to no longer use a node and move existing shards off to other nodes in the cluster:
curl -XPUT localhost:9200/_cluster/settings -d '{ "transient" :{ "cluster.routing.allocation.exclude._ip" : "<problematicServerIP>"} }';echo
Obviously, you'll swap your actual server IP/Name in there, and then tune in to watch the shards leave the node:
watch -n 10 "curl <problematicServerIP>:9200/_cat/shards -s|grep <problematicServerName> |wc -l"
When it reaches zero, it's ready for power down!