{"record":{"id":"f1dc4da3b4ebf792","repo":"kubernetes/kops","slug":"ssh-public-key-must-be-specified-when-running-with-f1dc4d","errorCode":null,"errorMessage":"SSH public key must be specified when running with Openstack (create with `kops create secret --name %s sshpublickey admin -i ~/.ssh/id_rsa.pub`)","messagePattern":"SSH public key must be specified when running with Openstack \\(create with `kops create secret --name (.+?) sshpublickey admin -i ~/\\.ssh/id_rsa\\.pub`\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/apply_cluster.go","lineNumber":477,"sourceCode":"\n\tcase kops.CloudProviderAzure:\n\t\t{\n\t\t\tif !featureflag.Azure.Enabled() {\n\t\t\t\treturn nil, fmt.Errorf(\"azure support is currently alpha, and is feature-gated. Please export KOPS_FEATURE_FLAGS=Azure\")\n\t\t\t}\n\n\t\t\tif len(sshPublicKeys) == 0 {\n\t\t\t\treturn nil, fmt.Errorf(\"SSH public key must be specified when running with AzureCloud (create with `kops create secret --name %s sshpublickey admin -i ~/.ssh/id_rsa.pub`)\", cluster.ObjectMeta.Name)\n\t\t\t}\n\n\t\t\tif len(sshPublicKeys) != 1 {\n\t\t\t\treturn nil, fmt.Errorf(\"exactly one 'admin' SSH public key can be specified when running with AzureCloud; please delete a key using `kops delete secret`\")\n\t\t\t}\n\t\t}\n\tcase kops.CloudProviderOpenstack:\n\t\t{\n\t\t\tif len(sshPublicKeys) == 0 {\n\t\t\t\treturn nil, fmt.Errorf(\"SSH public key must be specified when running with Openstack (create with `kops create secret --name %s sshpublickey admin -i ~/.ssh/id_rsa.pub`)\", cluster.ObjectMeta.Name)\n\t\t\t}\n\n\t\t\tif len(sshPublicKeys) != 1 {\n\t\t\t\treturn nil, fmt.Errorf(\"exactly one 'admin' SSH public key can be specified when running with Openstack; please delete a key using `kops delete secret`\")\n\t\t\t}\n\t\t}\n\n\tcase kops.CloudProviderScaleway:\n\t\t{\n\t\t\tif !featureflag.Scaleway.Enabled() {\n\t\t\t\treturn nil, fmt.Errorf(\"Scaleway support is currently alpha, and is feature-gated.  export KOPS_FEATURE_FLAGS=Scaleway\")\n\t\t\t}\n\n\t\t\tif len(sshPublicKeys) == 0 {\n\t\t\t\treturn nil, fmt.Errorf(\"SSH public key must be specified when running with Scaleway (create with `kops create secret --name %s sshpublickey admin -i ~/.ssh/id_rsa.pub`)\", cluster.ObjectMeta.Name)\n\t\t\t}\n\t\t\tif len(sshPublicKeys) != 1 {\n\t\t\t\treturn nil, fmt.Errorf(\"exactly one 'admin' SSH public key can be specified when running with Scaleway; please delete a key using `kops delete secret`\")","sourceCodeStart":459,"sourceCodeEnd":495,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/apply_cluster.go#L459-L495","documentation":"OpenStack requires an SSH keypair to be passed at server creation, but no admin sshpublickey secret was found in the state store, so the OpenStack cloud model cannot be built.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/apply_cluster.go:477 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the key secret: `kops create secret --name <cluster> sshpublickey admin -i ~/.ssh/id_rsa.pub`"],"exampleFix":null,"handlingStrategy":"validation","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-12T07:17:12.445Z"}