kubernetes/kops · error

instance IP address has not yet been created

Error message

instance IP address has not yet been created

What it means

Returned in Instance.mapToGCE when the instance spec references an Address task (e.IPAddress != nil) but the resolver returns a nil IP — i.e. the Address object exists in the model yet its IPAddress field is unset because the address has not been allocated yet. It indicates a task-dependency/ordering problem, not a GCE API failure.

Source

Thrown at upup/pkg/fi/cloudup/gcetasks/instance.go:244

		}
	}

	var networkInterfaces []*compute.NetworkInterface
	{
		networkInterface := &compute.NetworkInterface{
			AccessConfigs: []*compute.AccessConfig{{
				Type: "ONE_TO_ONE_NAT",
			}},
			Network: e.Network.URL(project),
		}

		if e.IPAddress != nil {
			addr, err := ipAddressResolver(e.IPAddress)
			if err != nil {
				return nil, fmt.Errorf("unable to resolve IP for instance: %v", err)
			}
			if addr == nil {
				return nil, fmt.Errorf("instance IP address has not yet been created")
			}
			networkInterface.AccessConfigs[0].NatIP = *addr
		}
		if e.Subnet != nil {
			networkInterface.Subnetwork = *e.Subnet.Name
		}
		if e.StackType != nil {
			networkInterface.StackType = *e.StackType
		}
		networkInterfaces = append(networkInterfaces, networkInterface)
	}

	var serviceAccounts []*compute.ServiceAccount
	if e.ServiceAccount != nil {
		if e.Scopes != nil {
			var scopes []string
			for _, s := range e.Scopes {
				s = scopeToLongForm(s)

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Ensure the Address task the instance depends on is created (has an IP) before the instance renders — add/verify the task dependency (e.AddDependency) so Address renders first
  2. Run with an explicit static address that is pre-allocated if ordering cannot be guaranteed
  3. Re-run the apply: the address may have been created on a prior partially-successful run
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/gcetasks/instance.go:244 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/e16817eb954766cf. Report an issue: GitHub.