kubernetes/kops · error

found no ElasticIPs for: %v

Error message

found no ElasticIPs for: %v

What it means

After DescribeAddresses succeeds, if zero addresses are returned for the given allocation ID or public-ip filter, find() throws 'found no ElasticIPs for: %v'. kOps expects the EIP referenced by the task to exist; returning nil here would silently drop it, so it hard-fails reconciliation instead.

Source

Thrown at upup/pkg/fi/cloudup/awstasks/elastic_ip.go:140

		publicIP = t.Value
		klog.V(2).Infof("Found public IP via tag: %v", *publicIP)
	}

	if publicIP != nil || allocationID != nil {
		request := &ec2.DescribeAddressesInput{}
		if allocationID != nil {
			request.AllocationIds = []string{fi.ValueOf(allocationID)}
		} else if publicIP != nil {
			request.Filters = []ec2types.Filter{awsup.NewEC2Filter("public-ip", *publicIP)}
		}

		response, err := cloud.EC2().DescribeAddresses(ctx, request)
		if err != nil {
			return nil, fmt.Errorf("error listing ElasticIPs: %v", err)
		}

		if response == nil || len(response.Addresses) == 0 {
			return nil, fmt.Errorf("found no ElasticIPs for: %v", e)
		}

		if len(response.Addresses) != 1 {
			return nil, fmt.Errorf("found multiple ElasticIPs for: %v", e)
		}
		a := response.Addresses[0]
		actual := &ElasticIP{
			ID:       a.AllocationId,
			PublicIP: a.PublicIp,
		}
		actual.TagOnSubnet = e.TagOnSubnet
		actual.AssociatedNatGatewayRouteTable = e.AssociatedNatGatewayRouteTable

		{
			tags, err := cloud.EC2().DescribeTags(ctx, &ec2.DescribeTagsInput{
				Filters: []ec2types.Filter{
					{
						Name:   aws.String("resource-id"),

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Confirm the EIP exists: aws ec2 describe-addresses --filters Name=public-ip,Values=<ip> or Name=allocation-id,Values=<eipalloc-id>
  2. If the EIP was intentionally deleted, remove/replace the ElasticIP task in the cluster spec (kops edit cluster) and re-run kops update cluster --yes
  3. If deleted unintentionally, allocate a new EIP and update the spec's PublicIP/ID accordingly
  4. If discovered via TagOnSubnet, check the subnet's AssociatedElasticIp tag value with aws ec2 describe-tags

Example fix

// before: spec references released EIP
PublicIP: fi.String("52.95.1.10") // released
// after: update to an existing allocated EIP
aws ec2 allocate-address --domain vpc
PublicIP: fi.String("52.95.1.42")
Defensive patterns

Strategy: validation

Validate before calling

out, err := ec2Client.DescribeAddresses(ctx, &ec2.DescribeAddressesInput{
    Filters: []ec2types.Filter{awsup.NewEC2Filter("public-ip", declaredIP)},
})
if err != nil || len(out.Addresses) == 0 {
    return fmt.Errorf("EIP %s does not exist; fix cluster spec before update", declaredIP)
}

Try / catch

err := runKopsUpdate(ctx)
if err != nil && strings.Contains(err.Error(), "found no ElasticIPs") {
    // re-allocate EIP or update spec before retrying
}

Prevention

When it happens

Trigger: The task has PublicIP or ID set (directly or discovered via NatGateway/TagOnSubnet), but DescribeAddresses matches no address: EIP was released, cluster spec edited to a non-existent IP, or the NGW-derived allocation ID points to a deleted NAT gateway address.

Common situations: Manually deleting an EIP in the AWS console while the cluster still references it; restoring a cluster spec from another account; changing regions; EIP released automatically after account/AWS service changes (e.g. EIPs of terminated NAT gateways).

Related errors


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