<p>I have successfully deployed a multi master Kubernetes cluster using the repo <a href="https://github.com/kubernetes-sigs/kubespray" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/kubespray</a> and everything works fine. But when I stop/terminate a node in the cluster, new node is not joining to the cluster.I had deployed kubernetes using KOPS, but the nodes were created automatically, when one deletes. Is this the expected behaviour in kubespray? Please help..</p>

manu thankachan
<p>It is expected behavior because kubespray doesn't create any ASGs, which are AWS-specific resources. One will observe that kubespray only deals with <em>existing</em> machines; they do offer some terraform toys in their repo for <em>provisioning</em> machines, but kubespray itself does not get into that business.</p>
<p>You have a few options available to you:</p>
<h2>Post-provision using <code>scale.yml</code></h2>
<ol>
<li>Provision the new Node using your favorite mechanism</li>
<li>Create an inventory file containing it, and the <code>etcd</code> machines (presumably so kubespray can issue etcd certificates for the new Node</li>
<li>Invoke the <a href="https://github.com/kubernetes-sigs/kubespray/blob/v2.10.0/scale.yml" rel="nofollow noreferrer"><code>scale.yml</code></a> playbook</li>
</ol>
<p>You may enjoy <a href="https://github.com/ansible/awx#readme" rel="nofollow noreferrer">AWX</a> in support of that.</p>
<h2>Using plain <code>kubeadm join</code></h2>
<p><em>This is the mechanism I use for my clusters, FWIW</em></p>
<ol>
<li><p>Create a kubeadm join token using <code>kubeadm token create --ttl 0</code> (or whatever TTL you feel comfortable using)</p>
<p>You'll only need to do this once, or perhaps once per ASG, depending on your security tolerances</p>
</li>
<li><p>Use the <a href="https://cloudinit.readthedocs.io/en/18.5/" rel="nofollow noreferrer">cloud-init</a> mechanism to ensure that <code>docker</code>, <code>kubeadm</code>, and <code>kubelet</code> binaries are present on the machine</p>
<p>You are welcome to use an AMI for doing that, too, if you enjoy building AMIs</p>
</li>
<li><p>Then invoke <code>kubeadm join</code> as described here: <a href="https://kubernetes.io/docs/setup/independent/high-availability/#install-workers" rel="nofollow noreferrer">https://kubernetes.io/docs/setup/independent/high-availability/#install-workers</a></p>
</li>
</ol>
<h2>Use a Machine Controller</h2>
<p>There are plenty of <a href="https://github.com/kubermatic/machine-controller#readme" rel="nofollow noreferrer">&quot;machine controller&quot; components</a> that aim to use custom controllers inside Kubernetes to manage your node pools declaratively. I don't have experience with them, but I believe they do work. That link was just the first one that came to mind, but there are others, too</p>
<p>Our friends over at Kubedex have <a href="https://kubedex.com/autoscaling/" rel="nofollow noreferrer">an entire page devoted to this question</a></p>
