<p>I have created a Kubernetes cluster on AWS by following the instructions below. All my master and worker nodes are running Ubuntu.</p>
<p><a href="https://jee-appy.blogspot.in/2017/10/setup-kubernetes-cluster-kops-aws.html" rel="nofollow noreferrer">https://jee-appy.blogspot.in/2017/10/setup-kubernetes-cluster-kops-aws.html</a></p>
<p>I am aware on how to increase or decrease the number of nodes in my cluster using cluster updates which kubernetes spins up a new node for us,</p>
<p>However i was wondering, is it possible to attach my external aws instance(for eg: an instance with same OS like ubuntu) to my existing kops cluster?</p>

Shruthi Bhaskar
<p>Kops means <a href="https://github.com/kubernetes/kops" rel="nofollow noreferrer">Kubernetes Operations</a>, and this is a command line tool made to maintain production grade Kubernetes installation. Kops works best with <a href="https://aws.amazon.com/" rel="nofollow noreferrer">Amazon Web Services</a>. There have been attempts to fully support GCE and other cloud-ware software, but this is the future.</p>

<p><a href="https://kubernetes.io/docs/concepts/architecture/nodes/" rel="nofollow noreferrer">Nodes</a> in <a href="https://kubernetes.io" rel="nofollow noreferrer">Kubernetes</a> mean physical or virtual machines where a cluster is running pods. The cluster consists of a number of nodes aimed to keep services working. The quantity of designated nodes is declared during the Kubernetes cluster creation by Kops utility. </p>

<p>There is a possibility to add (extend) nodes to the cluster to achieve better performance. When the process of provisioning new nodes is managed by internal cluster routines, this feature is called auto-scaling.</p>

<p>kops uses instance groups for auto-scaling. See your instance groups using</p>

<p>kops get instancegroups</p>

<p>Of course, you can attach your existing VM instance to Kubernetes cluster (working on AWS or not), but you need to do the whole thing manually - there is no import facility in the Kops utility. <strong>I don't recommend this.</strong></p>

<p>I found the description of manual installation process of <a href="https://devops.profitbricks.com/tutorials/getting-started-with-a-multi-node-kubernetes-cluster-on-ubuntu/" rel="nofollow noreferrer">Kubernetes elements </a> for the Ubuntu machine. It may help you a bit.</p>

<p>If you need to extend the number of running nodes for your Kubernetes configuration, please consider using the autoscaling feature.</p>

<p>In this case, use kops to edit cluster properties:</p>

<blockquote>
  <p>kops edit ig nodes</p>
</blockquote>

<p>After editor shows configuration file find minSize parameter and change it to desire new size of the cluster. Make sure the maxSize is equal to or larger than minSize. The example below was taken from the internet.</p>

<pre><code>apiVersion: kops.k8s.io/v1alpha2
kind: InstanceGroup
metadata:
  creationTimestamp: "2017-07-01T12:06:22Z"
  generation: 2
  labels:
    kops.k8s.io/cluster: URL_OF_CLUSTER
  name: nodes
spec:
  image: kope.io/k8s-1.6-debian-jessie-amd64-hvm-ebs-
  machineType: m3.large
  maxSize: 7
  minSize: 3
  nodeLabels:
    kops.k8s.io/instancegroup: nodes
  role: Node
  subnets:
  - eu-west-1a
</code></pre>

<p>Then, apply the new configuration and let kops resize the cluster:</p>

<blockquote>
  <p>kops update cluster --yes</p>
</blockquote>

<p>New VM instances will be ready after AWS creates them; next, kops applies Kubernetes configuration and merge them with cluster configuration.</p>
