{"record":{"id":"ee02406f5de845ce","repo":"GoogleContainerTools/skaffold","slug":"found-a-s-artifact-which-is-incompatible-with-ee0240","errorCode":null,"errorMessage":"found a '%s' artifact, which is incompatible with the 'cluster' builder:\n\n%s\n\nTo use the '%s' builder, remove the 'cluster' stanza from the 'build' section of your configuration. For information, see https://skaffold.dev/docs/pipeline-stages/builders/","messagePattern":"found a '(.+?)' artifact, which is incompatible with the 'cluster' builder:\n\n(.+?)\n\nTo use the '(.+?)' builder, remove the 'cluster' stanza from the 'build' section of your configuration\\. For information, see https://skaffold\\.dev/docs/pipeline-stages/builders/","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/validation/validation.go","lineNumber":669,"sourceCode":"\t\t\t\t\tLocation: cfg.YAMLInfos.Locate(&cfg.Build.Artifacts[i].ArtifactType),\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\tcase bc.GoogleCloudBuild != nil:\n\t\tfor i, a := range bc.Artifacts {\n\t\t\tat := misc.ArtifactType(a)\n\t\t\tif at != misc.Kaniko && at != misc.Docker && at != misc.Jib && at != misc.Buildpack && at != misc.Ko {\n\t\t\t\tcfgErrs = append(cfgErrs, ErrorWithLocation{\n\t\t\t\t\tError:    fmt.Errorf(\"found a '%s' artifact, which is incompatible with the 'gcb' builder:\\n\\n%s\\n\\nTo use the '%s' builder, remove the 'googleCloudBuild' stanza from the 'build' section of your configuration. For information, see https://skaffold.dev/docs/pipeline-stages/builders/\", misc.ArtifactType(a), misc.FormatArtifact(a), misc.ArtifactType(a)),\n\t\t\t\t\tLocation: cfg.YAMLInfos.Locate(&cfg.Build.Artifacts[i].ArtifactType),\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\tcase bc.Cluster != nil:\n\t\tfor i, a := range bc.Artifacts {\n\t\t\tif misc.ArtifactType(a) != misc.Kaniko && misc.ArtifactType(a) != misc.Custom {\n\t\t\t\tcfgErrs = append(cfgErrs, ErrorWithLocation{\n\t\t\t\t\tError:    fmt.Errorf(\"found a '%s' artifact, which is incompatible with the 'cluster' builder:\\n\\n%s\\n\\nTo use the '%s' builder, remove the 'cluster' stanza from the 'build' section of your configuration. For information, see https://skaffold.dev/docs/pipeline-stages/builders/\", misc.ArtifactType(a), misc.FormatArtifact(a), misc.ArtifactType(a)),\n\t\t\t\t\tLocation: cfg.YAMLInfos.Locate(&cfg.Build.Artifacts[i].ArtifactType),\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\treturn cfgErrs\n}\n\n// validateGCBConfig checks if GCB config is valid.\nfunc validateGCBConfig(cfg *parser.SkaffoldConfigEntry, bc latest.BuildConfig) (cfgErrs []ErrorWithLocation) {\n\tif bc.GoogleCloudBuild != nil && bc.GoogleCloudBuild.WorkerPool != \"\" {\n\t\tif !gcbWorkerPoolPattern.MatchString(bc.GoogleCloudBuild.WorkerPool) {\n\t\t\tcfgErrs = append(cfgErrs, ErrorWithLocation{\n\t\t\t\tError:    fmt.Errorf(\"invalid value for worker pool. Must match pattern projects/{project}/locations/{location}/workerPools/{worker_pool}\"),\n\t\t\t\tLocation: cfg.YAMLInfos.Locate(&cfg.Build.GoogleCloudBuild.WorkerPool),\n\t\t\t})\n\t\t}\n\t}","sourceCodeStart":651,"sourceCodeEnd":687,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/validation/validation.go#L651-L687","documentation":"The 'cluster' builder executes builds in-cluster via kaniko, so it only supports kaniko and custom artifact types. Any other artifact type combined with build.cluster fails validation, suggesting removal of the cluster stanza.","triggerScenarios":"skaffold.yaml has `build.cluster:` and an artifact whose type is neither kaniko nor custom; validated in validateArtifactTypes.","commonSituations":"Enabling in-cluster builds while keeping local docker/jib artifacts, or profiles that toggle cluster builds without adjusting artifacts.","solutions":["Remove the `cluster` stanza from build to use the local builder with these artifact types","Change artifacts to kaniko (or custom) if in-cluster building is required","Split artifacts across profiles with appropriate builders"],"exampleFix":"# before\nbuild:\n  cluster: {}\n  artifacts:\n    - image: myapp\n      docker:\n        dockerfile: Dockerfile\n# after\nbuild:\n  local: {}\n  artifacts:\n    - image: myapp\n      docker:\n        dockerfile: Dockerfile","handlingStrategy":"validation","validationCode":"if (config.build?.cluster && config.build.artifacts?.some(a => !a.kaniko && !a.custom)) {\n  throw new Error('cluster builder only supports kaniko and custom artifacts');\n}","typeGuard":"function clusterCompatible(cfg) {\n  return !cfg?.build?.cluster || cfg.build.artifacts?.every(a => !!a.kaniko || !!a.custom);\n}","tryCatchPattern":"try {\n  await skaffold.run(config);\n} catch (e) {\n  if (/incompatible with the 'cluster' builder/.test(e.message)) {\n    console.error('Switch to kaniko/custom artifacts or remove build.cluster');\n  } else throw e;\n}","preventionTips":["Only pair build.cluster with kaniko or custom artifacts","Keep docker/jib artifacts under build.local profiles","Validate configs with skaffold diagnose before cluster deployments"],"tags":["skaffold","config-validation","cluster-builder","kaniko"],"backgroundTag":"skaffold-config-validation","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}