heptio / aws-quickstart

AWS Kubernetes cluster via CloudFormation and kubeadm
Apache License 2.0
223 stars 134 forks source link

[Existing VPC] : Tag subnets as 'owned' #241

Open wiquan opened 5 years ago

wiquan commented 5 years ago

What steps did you take and what happened: With a pristine new stack in an existing VPC, much of the stack materializes, but some tags are missing on subnets such that any attempt to deploy something via Helm (eg. NextSteps:Wordpress ).

With an existing VPC and existing Subnets, you will hit:

because there are tags that are missing. Thus, it would be good to either add the tags to the existing subnets or WARN users that they will be getting a situation like this:

# External IP is wedged as pending because tags are missing on subnets
$ kubectl get svc --namespace varmywordpress wordpress-wordpress
NAME                  TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
wordpress-wordpress   LoadBalancer   10.104.13.150   <pending>     80:30789/TCP,443:32346/TCP   8m

What did you expect to happen: Expected the External IP to be replaced with an AWS resource. This happens if the template adds AWS Tags to the provided subnets for the stack being created.

Key= kubernetes.io/cluster/<<STACKNAME>>
Value= owned
$ kubectl get svc --namespace varmywordpress wordpress-wordpress
NAME                  TYPE           CLUSTER-IP     EXTERNAL-IP        PORT(S)                      AGE
wordpress-wordpress   LoadBalancer   10.100.207.5   abc12141d1b53...   80:31683/TCP,443:32357/TCP   24s

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

wiquan commented 5 years ago

Subnets can also be tagged as 'shared' (instead of owned). That works better for me, since my single VPC has multiple stacks deploying into the same subnets.

timothysc commented 5 years ago

So we might totally revamp this once we long term switch to cluster-api implementation, under the hood.

timothysc commented 5 years ago

/assign @chuckha @vincepri