kubernetes/kops · error
could not find Scaleway profile %q
Error message
could not find Scaleway profile %q
What it means
Validation guard in getScalewayProfile: SCW_PROFILE names a profile that does not exist in the loaded Scaleway config's Profiles map. The config file parsed fine, but it has no entry with that name — a typo or an outdated profile name.
Source
Thrown at upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go:39
"os"
"github.com/scaleway/scaleway-sdk-go/scw"
k8serrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/kops/upup/pkg/fi"
)
func getScalewayProfile() (*scw.Profile, error) {
scwProfileName := os.Getenv("SCW_PROFILE")
if scwProfileName == "" {
return nil, nil
}
config, err := scw.LoadConfig()
if err != nil {
return nil, fmt.Errorf("loading Scaleway config file: %w", err)
}
profile, ok := config.Profiles[scwProfileName]
if !ok {
return nil, fmt.Errorf("could not find Scaleway profile %q", scwProfileName)
}
return profile, nil
}
func checkCredentials(accessKey, secretKey, projectID string) []error {
errList := []error(nil)
if accessKey == "" {
errList = append(errList, fmt.Errorf("SCW_ACCESS_KEY has to be set"))
}
if secretKey == "" {
errList = append(errList, fmt.Errorf("SCW_SECRET_KEY has to be set"))
}
if projectID == "" {
errList = append(errList, fmt.Errorf("SCW_DEFAULT_PROJECT_ID has to be set"))
}
return errList
}
View on GitHub (pinned to 4c8573c808)
Solutions
- List available profiles in ~/.config/scw/config.yaml and fix the SCW_PROFILE value
- Create the profile with 'scw init' or add it to the config file
- Unset SCW_PROFILE to fall back to environment variables/default profile
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go:39 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/8a7fcb8b85a7261d.
Report an issue: GitHub.