{"record":{"id":"823a05257c1204b1","repo":"kubernetes/kops","slug":"spotinst-unable-to-load-credentials-v","errorCode":null,"errorMessage":"spotinst: unable to load credentials: %v","messagePattern":"spotinst: unable to load credentials: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/resources/spotinst/spotinst.go","lineNumber":146,"sourceCode":"\tcase kops.CloudProviderAWS:\n\t\treturn &awsOceanLaunchSpec{obj.(*awsoc.LaunchSpec)}, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"spotinst: unsupported cloud provider: %s\", cloudProviderID)\n\t}\n}\n\n// LoadCredentials attempts to load credentials using the default chain.\nfunc LoadCredentials() (credentials.Value, error) {\n\tvar (\n\t\tchain = NewCredentials()\n\t\tcreds credentials.Value\n\t\terr   error\n\t)\n\n\t// Attempt to load the credentials.\n\tcreds, err = chain.Get()\n\tif err != nil {\n\t\treturn creds, fmt.Errorf(\"spotinst: unable to load credentials: %v\", err)\n\t}\n\n\treturn creds, nil\n}\n","sourceCodeStart":128,"sourceCodeEnd":151,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/resources/spotinst/spotinst.go#L128-L151","documentation":"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.","triggerScenarios":"Thrown at pkg/resources/spotinst/spotinst.go:146 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide Spotinst credentials via environment variables (e.g. SPOTINST_TOKEN and SPOTINST_ACCOUNT)","Create a Spotinst credentials/config file (e.g. ~/.spotinst/credentials) readable by kOps","If using assumed roles/shared credentials, verify they are valid and not expired"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}