Unable to create ELB with 2 kubernetes clusters in the same AWS VPC and subnets using kops solution

10/11/2017

We are trying to test if we can have 2 or more k8s cluster in the same AWS VPC and Subnets (public and privates) using kops solution https://github.com/kubernetes/kops

We build the cluster with no issues, but when we try to expose a service through the ELB, it fails.

If we modify the subnet tag KubernetesCluster to the new cluster name, the ELB is published.

Is it possible to have multiple k8s cluster built with kops in the same subnets?

The KubernetesCluster tag supports multiple clusters?

Thanks in advance

-- iliMarie
amazon-web-services
kops
kubernetes

1 Answer

10/13/2017

Please refer to the kops documentation on shared subnets:

If you run in AWS private topology with shared subnets, and you would like Kubernetes to provision resources in these shared subnets, you must create tags on them with Key=value KubernetesCluster=. This is important, for example, if your utility subnets are shared, you will not be able to launch any services that create Elastic Load Balancers (ELBs).

Which means that yes, you will need to set the KubernetesCluster tag if you want resources that need ELBs.

-- vascop
Source: StackOverflow