argoproj/argo-workflows · error
unknown kind: %s
Error message
unknown kind: %s
What it means
getLintClients builds the API service clients for each kind passed to `argo lint --kinds`. Only workflow, workflowtemplate, cronworkflow, clusterworkflowtemplate (and empty/all) are recognized; anything else returns `unknown kind: %s`. It is an allowlist check before any linting starts.
Source
Thrown at cmd/argo/lint/lint.go:312
res.WorkflowTemplatesClient, err = client.NewWorkflowTemplateServiceClient()
if err != nil {
return ServiceClients{}, err
}
case wf.CronWorkflowPlural, wf.CronWorkflowShortName:
res.CronWorkflowsClient, err = client.NewCronWorkflowServiceClient()
if err != nil {
return ServiceClients{}, err
}
case wf.ClusterWorkflowTemplatePlural, wf.ClusterWorkflowTemplateShortName:
res.ClusterWorkflowTemplateClient, err = client.NewClusterWorkflowTemplateServiceClient()
if err != nil {
return ServiceClients{}, err
}
default:
return res, fmt.Errorf("unknown kind: %s", kind)
}
}
return res, nil
}
View on GitHub (pinned to 35bff19146)
Solutions
- Use only supported kinds: workflow, workflowtemplate, cronworkflow, clusterworkflowtemplate (comma-separated or omitted to lint all known kinds).
- Fix typos in the --kinds value; check `argo lint --help`.
- Upgrade the argo CLI if linting kinds introduced in newer versions.
Example fix
// before argo lint --kinds deployment ./manifests // after argo lint --kinds workflow,workflowtemplate ./manifests
Defensive patterns
Strategy: validation
Validate before calling
kinds := []string{"workflow","workflowtemplate","cronworkflow","clusterworkflowtemplate"}
for _, k := range requested { if !slices.Contains(kinds, k) { return fmt.Errorf("unsupported kind %q", k) } } Try / catch
clients, err := getLintClients(ctx, client, kinds)
if err != nil { return fmt.Errorf("argo lint kinds must be workflow|workflowtemplate|cronworkflow|clusterworkflowtemplate: %w", err) } Prevention
- Omit --kinds to lint all supported kinds
- Do not pass kubectl-style kinds (deployment, pod) to argo lint
- Match CLI version to the kinds your manifests use
When it happens
Trigger: `argo lint --kinds pod my-file.yaml` or `--kinds workfloo` (typo); scripts passing a kind name valid in kubectl but not in argo (e.g. `deployment`); older CLI versions missing a kind added later (e.g. clusterworkflowtemplate).
Common situations: Users assuming argo lint validates arbitrary Kubernetes manifests; copy-pasted --kinds values from other tooling; version mismatch where a newer kind name is used with an old argo binary.
Understand the failure class
Background: "unknown output mode", "invalid value for flag", "expects true/false": fixing invalid flag value errors in CLI tools — this error's family across 24 libraries.
Related errors
- unknown formatter: %s
- unknown output mode: %s
- requires either selector or workflow
- Multiple archived workflows found with name '%s': %s (Crea
- --client-certificate and --client-key must be provided toget
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/a6fdc8dfbddb5b5f.
Report an issue: GitHub.