kubernetes/kops · error
error from DescribeAddresses: %v
Error message
error from DescribeAddresses: %v
What it means
Thrown when EC2 DescribeAddresses fails while resolving the Elastic IP allocation attached to a NAT gateway address during FindNatGateways. The lookup is per allocation ID; failure aborts the entire listing including EIP discovery.
Source
Thrown at pkg/resources/aws/aws.go:1418
natGatewayId := aws.ToString(ngw.NatGatewayId)
forceShared := !ownedNatGatewayIds.Has(natGatewayId)
ngwResource := buildNatGatewayResource(ngw, forceShared, clusterName)
resourceTrackers = append(resourceTrackers, ngwResource)
// Don't try to remove ElasticIPs if NatGateway is shared
if ngwResource.Shared {
continue
}
// If we're deleting the NatGateway, we should delete the ElasticIP also
for _, address := range ngw.NatGatewayAddresses {
if address.AllocationId != nil {
request := &ec2.DescribeAddressesInput{}
request.AllocationIds = []string{aws.ToString(address.AllocationId)}
response, err := c.EC2().DescribeAddresses(ctx, request)
if err != nil {
return nil, fmt.Errorf("error from DescribeAddresses: %v", err)
}
for _, eip := range response.Addresses {
eipTracker := buildElasticIPResource(eip, !ownedNatGatewayIds.Has(natGatewayId), clusterName)
resourceTrackers = append(resourceTrackers, eipTracker)
}
}
}
}
}
return resourceTrackers, nil
}
// DeleteAutoScalingGroupLaunchTemplate deletes
func DeleteAutoScalingGroupLaunchTemplate(cloud fi.Cloud, r *resources.Resource) error {
ctx := context.TODO()
c, ok := cloud.(awsup.AWSCloud)View on GitHub (pinned to 4c8573c808)
Solutions
- Check embedded code: InvalidAllocationID.NotFound means the EIP is gone — treat as deleted and re-run enumeration.
- Grant ec2:DescribeAddresses in IAM if UnauthorizedOperation.
- Retry on throttling with backoff.
- Verify the EIP: `aws ec2 describe-addresses --allocation-ids <id>` in the right region.
Defensive patterns
Strategy: type-guard
Validate before calling
addr, err := ec2Client.DescribeAddresses(ctx, &ec2.DescribeAddressesInput{AllocationIds: []string{allocID}}); if err != nil || len(addr.Addresses) == 0 { /* EIP gone; skip */ } Type guard
func isAllocNotFound(err error) bool { return awsup.AWSErrorCode(err) == "InvalidAllocationID.NotFound" } Try / catch
err := /* wrapped DescribeAddresses error */
if isAllocNotFound(err) { continue } // EIP already released; skip this NAT gateway address
return err Prevention
- Treat InvalidAllocationID.NotFound as already-deleted, matching kops' pattern for other resources
- Keep ec2:DescribeAddresses in IAM
- Re-run listing after races; released EIPs won't reappear
When it happens
Trigger: DescribeAddresses with AllocationIds=[eipalloc-...] returns InvalidAllocationID.NotFound (EIP already released), UnauthorizedOperation, throttling, or AuthFailure.
Common situations: EIP was released between discovering the NAT gateway and describing addresses (race); stale NAT gateway referencing a freed EIP; IAM missing ec2:DescribeAddresses.
Related errors
- error describing addresses: %v
- error describing RouteTables: %v
- error describing NatGateways: %v
- error from DescribeRouteTables: %v
- error from DescribeNatGateways: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/51a7d3c53142f30f.
Report an issue: GitHub.