GoogleContainerTools/skaffold · error
action %v not found for k8s execution mode
Error message
action %v not found for k8s execution mode
What it means
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.
Source
Thrown at pkg/skaffold/actions/k8sjob/exec_env.go:134
func (e ExecEnv) Stop() {
// This is to drain the logs from the succeeded jobs. Failed jobs were already removed from the cluster.
e.logger.Stop()
}
func (e ExecEnv) createActions(bs []graph.Artifact, acsNames []string) ([]actions.Action, error) {
var acs []actions.Action
var toTrack []graph.Artifact
builtArtifacts := map[string]graph.Artifact{}
for _, b := range bs {
builtArtifacts[b.ImageName] = b
}
for _, aName := range acsNames {
aCfg, found := e.acsCfgByName[aName]
if !found {
return nil, fmt.Errorf("action %v not found for k8s execution mode", aName)
}
jmp := aCfg.ExecutionModeConfig.KubernetesClusterExecutionMode.JobManifestPath
o := aCfg.ExecutionModeConfig.KubernetesClusterExecutionMode.Overrides
jm, err := e.getJobManifest(jmp, o)
if err != nil {
return nil, err
}
ts, artifactsToTrack := e.createTasks(aCfg, jm, builtArtifacts)
acs = append(acs, *actions.NewAction(aCfg.Name, *aCfg.Config.Timeout, *aCfg.Config.IsFailFast, ts))
toTrack = append(toTrack, artifactsToTrack...)
}
e.logger.RegisterArtifacts(toTrack)
return acs, nilView on GitHub (pinned to a1189de023)
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.
Example fix
// before (skaffold.yaml) action: myTest: ... // after actions: myTest: ...
Defensive patterns
Strategy: validation
Validate before calling
// Validate action names in the k8s execution-mode config exist
const yaml = require('js-yaml').load(require('fs').readFileSync('skaffold.yaml','utf8'));
for (const a of yaml.verify?.executionMode?.kubernetesCluster?.actions ?? []) {
if (!yaml.actions?.[a]) throw new Error(`action ${a} not defined under actions:`);
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- action %v not found for local execution mode
- unable to connect to Kubernetes: %w
- c.Message (pod status condition message)
- unable to lookup minikube executable. Please add it to PATH
- value must be one of `always`, `missing`, or `never`
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/5184cc58596e991b.
Report an issue: GitHub.