title: Elasticsearch 7.2.0: master not discovered or elected yet, an election requires at least X nodes
body: <p>I'm trying to automate the process of horizontal scale up and scale down of elasticsearch nodes in kubernetes cluster.</p>
  
  <p>Initially, I deployed an elasticsearch cluster (3 master, 3 data &amp; 3 ingest nodes) on a Kubernetes cluster. Where, <code>cluster.initial_master_nodes</code> was:</p>
  
  <pre class="lang-yaml prettyprint-override"><code>cluster.initial_master_nodes:
    - master-a
    - master-b
    - master-c
  </code></pre>
  
  <p>Then, I performed scale down operation, reduced the number of master node 3 to 1 (unexpected, but for testing purpose). While doing this, I deleted <code>master-c</code>, <code>master-b</code> nodes and restarted <code>master-a</code> node with the following setting:</p>
  
  <pre class="lang-yaml prettyprint-override"><code>cluster.initial_master_nodes:
    - master-a
  </code></pre>
  
  <p>Since the elasticsearch nodes (i.e. pods) use persistant volume, after restarting the node, the <code>master-a</code> slowing the following logs:</p>
  
  <pre><code>"message": "master not discovered or elected yet, an election requires at least 2 nodes with ids from [TxdOAdryQ8GAeirXQHQL-g, VmtilfRIT6KDVv1R6MHGlw, KAJclUD2SM6rt9PxCGACSA], have discovered [] which is not a quorum; discovery will continue using [] from hosts providers and [{master-a}{VmtilfRIT6KDVv1R6MHGlw}{g29haPBLRha89dZJmclkrg}{10.244.0.95}{10.244.0.95:9300}{ml.machine_memory=12447109120, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 5, last-accepted version 40 in term 5"  }
  </code></pre>
  
  <p>Seems like it's trying to find <code>master-b</code> and <code>master-c</code>.</p>
  
  <p>Questions:</p>
  
  <ul>
  <li>How to overwrite cluster settings so that <code>master-a</code> won't search for these deleted nodes?</li>
  </ul>