Disable shard allocation

PUT _cluster/settings
  "transient": {
    "cluster.routing.allocation.enable": "none"

Stop non-essential indexing and perform a synced flush (Optional)

POST _flush/synced

Stop and upgrade a single node and install x-pack

Start the upgraded node

GET _cat/nodes

Reenable shard allocation

Wait for the node to recover


bin/elasticsearch-plugin remove analysis-smartcn
bin/elasticsearch-plugin remove elasticsearch-vector-scoring
bin/elasticsearch-plugin install x-pack

xpack.ml.enabled: false
xpack.monitoring.enabled: false
xpack.security.enabled: false
xpack.watcher.enabled: false