kubernetes/kops · error
found multiple RouteTables matching tags
Error message
found multiple RouteTables matching tags
What it means
findRouteTableByFilters expects the tag filters (cluster/role tags) to match exactly one route table. Multiple matches mean the tagging scheme is ambiguous — kOps refuses to guess and returns this error.
Source
Thrown at upup/pkg/fi/cloudup/awstasks/routetable.go:146
rt := response.RouteTables[0]
return &rt, nil
}
func findRouteTableByFilters(ctx context.Context, cloud awsup.AWSCloud, filters []ec2types.Filter) (*ec2types.RouteTable, error) {
request := &ec2.DescribeRouteTablesInput{}
request.Filters = filters
response, err := cloud.EC2().DescribeRouteTables(ctx, request)
if err != nil {
return nil, fmt.Errorf("error listing RouteTables: %v", err)
}
if response == nil || len(response.RouteTables) == 0 {
return nil, nil
}
if len(response.RouteTables) != 1 {
return nil, fmt.Errorf("found multiple RouteTables matching tags")
}
rt := response.RouteTables[0]
return &rt, nil
}
func (e *RouteTable) Run(c *fi.CloudupContext) error {
return fi.CloudupDefaultDeltaRunMethod(e, c)
}
func (s *RouteTable) CheckChanges(a, e, changes *RouteTable) error {
if a == nil {
if e.VPC == nil {
return fi.RequiredField("VPC")
}
}
if a != nil {
if changes.VPC != nil && changes.VPC.ID != nil {
return fi.CannotChangeField("VPC")View on GitHub (pinned to 4c8573c808)
Solutions
- List tables with matching tags (`aws ec2 describe-route-tables --filters Name=tag:kubernetes.io/cluster/<cluster>,Values=owned`) and delete the duplicates
- Run `kops delete cluster` for stale clusters before recreating
- Correct tags manually so only one table carries the expected role tags for the subnet
- If using a shared VPC, scope tags/cluster names to avoid collisions
Example fix
// before: two tables tagged kubernetes.io/cluster=mycluster=owned aws ec2 delete-route-table --route-table-id rtb-duplicate // after: exactly one table retains the tags
Defensive patterns
Strategy: validation
Validate before calling
aws ec2 describe-route-tables --filters Name=tag:kubernetes.io/cluster/mycluster.example.com,Values=owned --query 'length(RouteTables)' # must be 1 before running kops update
Prevention
- Delete orphaned/stale clusters with `kops delete cluster` before recreating with the same name
- Never clone route tables while keeping kOps ownership tags
- Use unique cluster names in shared VPCs
- Audit tags periodically to guarantee one table per (cluster, role) pair
When it happens
Trigger: More than one EC2 route table carries the same kOps tags (e.g. duplicate 'kubernetes.io/cluster/<name>=owned' or role tags), typically because a previous run left orphaned resources or tables were copied/cloned.
Common situations: Re-running `kops create cluster` with the same cluster name against an existing VPC; manual table duplication during DR setup; leftover resources from a failed teardown; shared-VPC setups where an old cluster's tables share tags.
Related errors
- Could not find '%s' tag from route table
- found multiple Volumes with name: %s
- error adding AWS Tags to EBS Volume: %v
- found multiple EgressOnlyInternetGateways matching tags
- error querying tags for ElasticIP: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/f57c62ea933936dc.
Report an issue: GitHub.