Cannot add manually created subnet to cluster using subnet id
Problem: I have created a cluster using the HA-guide and after that I created new subnet & route table manually using AWS console. I try to add this new subnet to the cluster spec but I get an error after kops edit cluster:
cannot mix subnets with specified ID and unspecified ID
Cluster subnet spec:
subnets:
- cidr: 172.20.32.0/19
name: eu-west-1a
type: Private
zone: eu-west-1a
- cidr: 172.20.64.0/19
name: eu-west-1b
type: Private
zone: eu-west-1b
- cidr: 172.20.96.0/19
name: eu-west-1c
type: Private
zone: eu-west-1c
- cidr: 172.20.0.0/22
name: utility-eu-west-1a
type: Utility
zone: eu-west-1a
- cidr: 172.20.4.0/22
name: utility-eu-west-1b
type: Utility
zone: eu-west-1b
- cidr: 172.20.8.0/22
name: utility-eu-west-1c
type: Utility
zone: eu-west-1c
- id: <subnet_id>
name: <subnet_name>
type: Private
zone: eu-west-1a
What I try to achieve:
I have my kubernetes cluster with a new instance group called clerks. This instance group has to have custom route in the route table. I think this requires that I manually create new subnet and route table and then somehow attach that subnet to that instance group. This requires that the subnet is added to the cluster spec? But the cluster spec doesn't allow mixed subnets (with/without id).
Kops version 1.6.2 (git-98ae12a)
So after reading the "Running in a shared VPC" few times more I noticed that "You must specify pre-create subnets for all the subnets, or for none of them."
So using custom subnet or custom route table requires that kops doesn't manage any subnets since they need to be pre-created so that the 'id' can be set on the cluster subnet spec.
It would be great if this "with and without id" in the cluster subnet spec would work. Even setting route-table for the subnet in the spec would be enough.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an /lifecycle frozen comment.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten /remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close