kubernetes/kops · error

found more than one floating ip for instance

Error message

found more than one floating ip for instance %v

What it means

More than one floating IP is associated with the instance's port. kops models at most one floating IP per instance; multiple associations indicate manual changes or leftover IPs and make the mapping ambiguous.

Solutions

  1. List floating IPs for the port and remove stale associations
  2. Keep exactly one floating IP per instance port
  3. Re-run discovery afterwards
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/openstacktasks/instance.go:245 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/4ad3033dd0299db5. Report an issue: GitHub.

Appendix: source

Thrown at upup/pkg/fi/cloudup/openstacktasks/instance.go:245

	if e.FloatingIP != nil && e.Port != nil {
		fips, err := cloud.ListL3FloatingIPs(l3floatingip.ListOpts{
			PortID: fi.ValueOf(e.Port.ID),
		})
		if err != nil {
			return nil, fmt.Errorf("failed to fetch floating ips for instance %v: %v", server.ID, err)
		}

		if len(fips) == 1 {
			fip := fips[0]
			fipTask := &FloatingIP{
				ID:   new(fip.ID),
				Name: new(fip.Description),
			}

			actual.FloatingIP = fipTask
		} else if len(fips) > 1 {
			return nil, fmt.Errorf("found more than one floating ip for instance %v", server.ID)
		}
	}

	// Avoid flapping
	e.ID = actual.ID
	e.Status = new(activeStatus)
	actual.WellKnownServices = e.WellKnownServices

	// Immutable fields
	actual.Flavor = e.Flavor
	actual.Image = e.Image
	actual.UserData = e.UserData
	actual.Region = e.Region
	actual.SSHKey = e.SSHKey
	actual.ServerGroup = e.ServerGroup

	return actual, nil
}

View on GitHub (pinned to 4c8573c808)