kubernetes/kops · error

failed to find network interfaces matching %q: %w

Error message

failed to find network interfaces matching %q: %w

What it means

FindELBV2NetworkInterfacesByName failed while looking up the NLB's network interfaces to build the API load-balancer address set; the underlying EC2 describe-envelopes call errored and the AWS detail is wrapped with %w.

Source

Thrown at upup/pkg/fi/cloudup/awstasks/network_load_balancer.go:371

	cluster := c.T.Cluster

	{
		allLoadBalancers, err := awsup.ListELBV2LoadBalancers(ctx, cloud)
		if err != nil {
			return nil, err
		}

		lb := awsup.FindLatestELBV2ByNameTag(allLoadBalancers, fi.ValueOf(e.Name))

		if lb != nil {
			if fi.ValueOf(lb.LoadBalancer.DNSName) != "" {
				addresses = append(addresses, fi.ValueOf(lb.LoadBalancer.DNSName))
			}

			if cluster.UsesLoadBalancerForKopsController() {
				nis, err := cloud.FindELBV2NetworkInterfacesByName(fi.ValueOf(e.VPC.ID), aws.ToString(lb.LoadBalancer.LoadBalancerName))
				if err != nil {
					return nil, fmt.Errorf("failed to find network interfaces matching %q: %w", aws.ToString(lb.LoadBalancer.LoadBalancerName), err)
				}
				for _, ni := range nis {
					if fi.ValueOf(ni.PrivateIpAddress) != "" {
						addresses = append(addresses, fi.ValueOf(ni.PrivateIpAddress))
					}
					for _, v6 := range ni.Ipv6Addresses {
						addresses = append(addresses, fi.ValueOf(v6.Ipv6Address))
					}
				}
			}
		}
	}

	sort.Strings(addresses)

	return addresses, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check EC2 DescribeNetworkInterfaces permissions in the VPC
  2. Retry the apply — describe calls can fail transiently under throttling
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/awstasks/network_load_balancer.go:371 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/d064644824c9a714. Report an issue: GitHub.