kubernetes/kops · error
error listing RouteTables: %v
Error message
error listing RouteTables: %v
What it means
RouteTableAssociation.Find looks up the route table by ID via DescribeRouteTables to locate an existing association for a subnet. API errors are wrapped with this message; an empty result correctly returns nil, nil.
Source
Thrown at upup/pkg/fi/cloudup/awstasks/routetableassociation.go:64
func (e *RouteTableAssociation) Find(c *fi.CloudupContext) (*RouteTableAssociation, error) {
ctx := c.Context()
cloud := awsup.GetCloud(c)
routeTableID := e.RouteTable.ID
subnetID := e.Subnet.ID
if routeTableID == nil || subnetID == nil {
return nil, nil
}
request := &ec2.DescribeRouteTablesInput{
RouteTableIds: []string{fi.ValueOf(routeTableID)},
}
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]
for _, rta := range rt.Associations {
if aws.ToString(rta.SubnetId) != *subnetID {
continue
}
actual := &RouteTableAssociation{
Name: e.Name,
ID: rta.RouteTableAssociationId,
RouteTable: &RouteTable{ID: rta.RouteTableId},
Subnet: &Subnet{ID: rta.SubnetId},View on GitHub (pinned to 4c8573c808)
Solutions
- Verify the route table ID exists via AWS CLI describe-route-tables
- Check IAM permissions for ec2:DescribeRouteTables
- Re-run the reconcile after transient AWS failures
- Inspect the wrapped AWS error code to target the actual cause
Defensive patterns
Strategy: retry
Validate before calling
aws ec2 describe-route-tables --route-table-ids rtb-123 || echo "table gone"
Try / catch
var aerr smithy.APIError
if errors.As(err, &aerr) && (aerr.ErrorCode() == "ThrottlingException" || aerr.ErrorCode() == "RequestLimitExceeded") {
backoffAndRetry()
} Prevention
- Keep route tables referenced by associations alive during updates
- Grant ec2:DescribeRouteTables to the operator role
- Avoid concurrent mass reconciliation to dodge throttling
When it happens
Trigger: DescribeRouteTables by route table ID errors during Find: invalid/deleted table ID, IAM missing ec2:DescribeRouteTables, throttling, or connectivity issues.
Common situations: Route table removed out-of-band; CI environment with insufficient IAM; throttled accounts during large reconciles; stale kOps cluster state.
Related errors
- describing instance for arn %q
- error terminating instances: %v
- error describing instances: %v
- error describing addresses: %v
- error describing volumes: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/117bc450086f926b.
Report an issue: GitHub.