GKE with Aws worker nodes

4/25/2019

Is it possible to add aws ec2 nodes to GKE cluster as worker nodes?

I created a cluster( named as "mycluster" ) in GKE with the three nodes, now i want to add aws ec2 instance to mycluster as a worker node. Is that possible to add to the existing cluster? please help me on this issue.

-- saikrishna
amazon-ec2
google-kubernetes-engine

1 Answer

4/25/2019

It might be technically possible (if you figured out how to give a kubelet on the AWS node credentials to join the cluster) but it isn't really a great idea for a couple of reasons:

  1. Kubernetes is designed with the assumption that a cluster is made up of nodes that are colocated, e.g. have high speed, low latency networking between them and that nodes are on the same network and can reach each other.
  2. The control plane for a Kubernetes cluster generally has extensions installed that are specific to the environment in which the nodes are running (commonly called cloud provider extensions). While it is possible to run the control plane and the nodes in different environments, you would want all of the nodes to be in the same environment and the control plane to be configured with the cloud provider configured for the node environment. GKE does not support this scenario or provide a way for you to install the cloud provider extensions for AWS.
-- Robert Bailey
Source: StackOverflow