kubernetes/kops · error

spotinst: unable to load credentials: %v

Error message

spotinst: unable to load credentials: %v

What it means

LoadCredentials delegates to the Spotinst credential chain; chain.Get() failed, so no token/account could be resolved. The wrapped error is the chain's own reason — typically missing credentials or a rejected token.

Source

Thrown at pkg/resources/spotinst/spotinst.go:146

	case kops.CloudProviderAWS:
		return &awsOceanLaunchSpec{obj.(*awsoc.LaunchSpec)}, nil
	default:
		return nil, fmt.Errorf("spotinst: unsupported cloud provider: %s", cloudProviderID)
	}
}

// LoadCredentials attempts to load credentials using the default chain.
func LoadCredentials() (credentials.Value, error) {
	var (
		chain = NewCredentials()
		creds credentials.Value
		err   error
	)

	// Attempt to load the credentials.
	creds, err = chain.Get()
	if err != nil {
		return creds, fmt.Errorf("spotinst: unable to load credentials: %v", err)
	}

	return creds, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Provide Spotinst credentials via environment variables (e.g. SPOTINST_TOKEN and SPOTINST_ACCOUNT)
  2. Create a Spotinst credentials/config file (e.g. ~/.spotinst/credentials) readable by kOps
  3. If using assumed roles/shared credentials, verify they are valid and not expired
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at pkg/resources/spotinst/spotinst.go:146 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/823a05257c1204b1. Report an issue: GitHub.