{"record":{"id":"5184cc58596e991b","repo":"GoogleContainerTools/skaffold","slug":"action-v-not-found-for-k8s-execution-mode","errorCode":null,"errorMessage":"action %v not found for k8s execution mode","messagePattern":"action (.+?) not found for k8s execution mode","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/actions/k8sjob/exec_env.go","lineNumber":134,"sourceCode":"\nfunc (e ExecEnv) Stop() {\n\t// This is to drain the logs from the succeeded jobs. Failed jobs were already removed from the cluster.\n\te.logger.Stop()\n}\n\nfunc (e ExecEnv) createActions(bs []graph.Artifact, acsNames []string) ([]actions.Action, error) {\n\tvar acs []actions.Action\n\tvar toTrack []graph.Artifact\n\tbuiltArtifacts := map[string]graph.Artifact{}\n\n\tfor _, b := range bs {\n\t\tbuiltArtifacts[b.ImageName] = b\n\t}\n\n\tfor _, aName := range acsNames {\n\t\taCfg, found := e.acsCfgByName[aName]\n\t\tif !found {\n\t\t\treturn nil, fmt.Errorf(\"action %v not found for k8s execution mode\", aName)\n\t\t}\n\n\t\tjmp := aCfg.ExecutionModeConfig.KubernetesClusterExecutionMode.JobManifestPath\n\t\to := aCfg.ExecutionModeConfig.KubernetesClusterExecutionMode.Overrides\n\t\tjm, err := e.getJobManifest(jmp, o)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tts, artifactsToTrack := e.createTasks(aCfg, jm, builtArtifacts)\n\n\t\tacs = append(acs, *actions.NewAction(aCfg.Name, *aCfg.Config.Timeout, *aCfg.Config.IsFailFast, ts))\n\t\ttoTrack = append(toTrack, artifactsToTrack...)\n\t}\n\n\te.logger.RegisterArtifacts(toTrack)\n\n\treturn acs, nil","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/actions/k8sjob/exec_env.go#L116-L152","documentation":"Analogous to the local mode check: createActions in the k8sjob exec environment looks up each requested action name in acsCfgByName and errors when an action referenced for the KubernetesCluster execution mode has no corresponding definition in the loaded skaffold config.","triggerScenarios":"Running skaffold run/verify with executionMode kubernetesCluster (or --action flag) where the named action is absent from the `actions:` stanza of the effective skaffold.yaml.","commonSituations":"Action defined only for local mode configs; profile not activated that contains the action; typo in name inside the kubernetesCluster execution-mode action list; YAML indentation placing the action outside the actions map.","solutions":["Compare the action name in the error with keys under `actions:` in your skaffold.yaml and fix the typo.","Activate the profile that defines the action (-p <profile>) or move the definition into the active config.","Validate YAML structure so the action lands under actions.<name> (skaffold config accepts it) rather than a sibling key."],"exampleFix":"// before (skaffold.yaml)\naction:\n  myTest: ...\n// after\nactions:\n  myTest: ...","handlingStrategy":"validation","validationCode":"// Validate action names in the k8s execution-mode config exist\nconst yaml = require('js-yaml').load(require('fs').readFileSync('skaffold.yaml','utf8'));\nfor (const a of yaml.verify?.executionMode?.kubernetesCluster?.actions ?? []) {\n  if (!yaml.actions?.[a]) throw new Error(`action ${a} not defined under actions:`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep action names identical across local and kubernetesCluster execution modes","Schema-validate skaffold.yaml in CI (skaffold config or JSON schema lint)","Ensure YAML indentation places actions under the actions: map"],"tags":["skaffold","configuration","kubernetes","custom-actions"],"backgroundTag":"action-not-found-in-config","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"}