kubernetes/kops · error

error querying for route53 records for zone %q: %v

Error message

error querying for route53 records for zone %q: %v

What it means

Fires in ListRoute53Records when a page of ListResourceRecordSets fails for a hosted zone during AWS resource discovery for cluster teardown — an AWS API/network failure while enumerating DNS records, not an indication the records are missing.

Source

Thrown at pkg/resources/aws/aws.go:1846

			}
		}
	}

	for i := range zones {
		// Be super careful because we close over this later (in groupDeleter)
		zone := zones[i]

		hostedZoneID := strings.TrimPrefix(aws.ToString(zone.Id), "/hostedzone/")

		klog.V(2).Infof("Querying for records in zone: %q", aws.ToString(zone.Name))
		request := &route53.ListResourceRecordSetsInput{
			HostedZoneId: zone.Id,
		}
		paginator := route53.NewListResourceRecordSetsPaginator(c.Route53(), request)
		for paginator.HasMorePages() {
			page, err := paginator.NextPage(ctx)
			if err != nil {
				return nil, fmt.Errorf("error querying for route53 records for zone %q: %v", aws.ToString(zone.Name), err)
			}
			for _, rrs := range page.ResourceRecordSets {
				if rrs.Type != route53types.RRTypeA &&
					rrs.Type != route53types.RRTypeAaaa &&
					rrs.Type != route53types.RRTypeTxt {
					continue
				}

				name := aws.ToString(rrs.Name)
				name = "." + strings.TrimSuffix(name, ".")

				if !strings.HasSuffix(name, clusterName) {
					continue
				}
				prefix := strings.TrimSuffix(name, clusterName)

				// Also trim ownership records for AAAA records
				if rrs.Type == route53types.RRTypeTxt && strings.HasPrefix(prefix, ".aaaa-") {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check AWS credentials and route53:ListResourceRecordSets permission for the zone
  2. Retry; paginate again after transient throttling or network errors
  3. Verify the hosted zone still exists and is accessible in the target account
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at pkg/resources/aws/aws.go:1846 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/9ec69d2314e715eb. Report an issue: GitHub.