kubernetes/kops · error

getting addresses for network interface %q: %w

Error message

getting addresses for network interface %q: %w

What it means

In the kube-apiserver builder's IPv6-only workaround for bare-metal (kubernetes#111671), intf.Addrs() failure is wrapped here. It fires when the OS refuses to enumerate addresses on one of the machine's network interfaces (interface went down mid-iteration, permissions), aborting the builder's search for a local IPv6 address to use as AdvertiseAddress.

Source

Thrown at nodeup/pkg/model/kube_apiserver.go:93

			return err
		}
		if localIP != "" {
			kubeAPIServer.AdvertiseAddress = localIP
		}
	}

	if b.CloudProvider() == kops.CloudProviderMetal {
		// Workaround for https://github.com/kubernetes/kubernetes/issues/111671
		if b.IsIPv6Only() {
			interfaces, err := net.Interfaces()
			if err != nil {
				return fmt.Errorf("getting local network interfaces: %w", err)
			}
			var ipv6s []net.IP
			for _, intf := range interfaces {
				addresses, err := intf.Addrs()
				if err != nil {
					return fmt.Errorf("getting addresses for network interface %q: %w", intf.Name, err)
				}
				for _, addr := range addresses {
					ip, _, err := net.ParseCIDR(addr.String())
					if ip == nil {
						return fmt.Errorf("parsing ip address %q (bound to network %q): %w", addr.String(), intf.Name, err)
					}
					if ip.To4() != nil {
						// We're only looking for ipv6
						continue
					}
					if ip.IsLinkLocalUnicast() {
						klog.V(4).Infof("ignoring link-local unicast addr %v", addr)
						continue
					}
					if ip.IsLinkLocalMulticast() {
						klog.V(4).Infof("ignoring link-local multicast addr %v", addr)
						continue
					}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check interface health with ip addr
  2. Ignore the broken interface if not needed
  3. Re-run nodeup
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at nodeup/pkg/model/kube_apiserver.go:93 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/9a837d493388b407. Report an issue: GitHub.