<p>Once we increase load by using JMeter client than my deployed service is interrupted and on GCP/GKE console it says that - </p>

<pre><code>Upgrading cluster master
The values shown below are going to change soon.
</code></pre>

<p>And my kubectl client throw this error during upgrade - </p>

<pre><code>Unable to connect to the server: dial tcp 35.236.238.66:443: connectex: No connection could be made because the target machine actively refused it.
</code></pre>

<p>How can I stop this upgrade or prevent my service interruption ? If service will be intrupted than there is no benefit of this auto scaling. I am new to GKE, please let me know if I am missing any configuration or parameter here. 
I am using this command to create my cluster-</p>

<pre><code>gcloud container clusters create ajeet-gke --zone us-east4-b --node-locations us-east4-b --machine-type n1-standard-8 --num-nodes 1 --enable-autoscaling --min-nodes 4 --max-nodes 16
</code></pre>

<p>It is not upgrading k8s version. Because it works fine with smaller load but as I increase load than cluster starts upgrade of master. So it looks the master is resizing itself for more nodes. After upgrade I can see more nodes on GCP console. <a href="https://github.com/terraform-providers/terraform-provider-google/issues/3385" rel="nofollow noreferrer">https://github.com/terraform-providers/terraform-provider-google/issues/3385</a></p>

<p>Below command says auto scaling is not enabled on instance group.</p>

<pre><code>&gt; gcloud compute instance-groups managed list
NAME                     AUTOSCALED  LOCATION    SCOPE   ---
ajeet-gke-cluster-      no        us-east4-b   zone   ---
default-pool-4***0 
</code></pre>

<p><strong>Workaround</strong> </p>

<p>Sorry forget to update it here, I found a workaround to fix it - after splitting cluster creation command in to two steps cluster is auto scaling without restarting master node:</p>

<pre><code>gcloud container clusters create ajeet-ggs --zone us-east4-b --node-locations us-east4-b --machine-type n1-standard-8 --num-nodes 1
gcloud container clusters update ajeet-ggs --enable-autoscaling --min-nodes 1 --max-nodes 10 --zone us-east4-b --node-pool default-pool
</code></pre>

Ajeet
<p>To prevent this you should always create your cluster with hardcoded cluster version to the last version available.</p>

<p>See the documentation: <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#master" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#master</a></p>

<p>This means that Goolge is managing the master, meaning that if your master is not up to date it will be updated to be in the last version and allow google to limit the number of version currently managed. <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/regional-clusters" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/concepts/regional-clusters</a></p>

<p>Now why do you have an interruption of service during the update: because you are in zonal mode with only one master, to prevent this you should go in regional cluster mode with more than one master, allowing for clean rolling update.</p>
