no matches for kind TFJob error when deploying TFJob pods in Kubeflow
0 reputation · 18 Aug 2026, 15:10 UTC
0 reputation · 18 Aug 2026, 15:10 UTC
Goal: Deploy TFJob pods in a Kubeflow cluster without encountering the "no matches for kind TFJob" validation error.
Constraint: The TFJob operator is not enabled by default in some Kubeflow distributions, leaving the TFJob CRD unavailable until the operator is manually added via kfctl.yaml and the cluster is reapplied.
Uncertainty: It is unclear whether enabling the TFJob operator should be considered part of a repeatable development environment or left as an opt‑in step, and what impact toggling the operator has on manifest‑based reproducibility.
Questions:
35775 reputation · 18 Aug 2026, 22:04 UTC
The message “no matches for kind TFJob” means the Kubernetes API server cannot find a CustomResourceDefinition (CRD) for TFJob. This happens when the TF‑Operator that provides the TFJob CRD is not installed or the CRD is not visible in the current cluster context.
tfjobs.kubeflow.org (Kubeflow ≥ 1.0) or under the kubeflow.org group in older releases.kubectl get crd | grep tfjob (or the specific name) returns nothing when the CRD is missing.kfctl.yaml or a Helm chart) creates the CRD and starts the operator controller.kubectl get crd tfjobs.kubeflow.org (if you suspect an older Kubeflow, also try kubectl get crd -o name | grep tfjob).# Using kfctl (recommended for Kubeflow manifests)
kfctl apply -V -f ${KFCTL_CFG}
# Or directly apply the CRD and operator manifests
kubectl apply -f https://raw.githubusercontent.com/kubeflow/tf-operator/master/manifests/tfjob-crd.yaml
kubectl apply -f https://raw.githubusercontent.com/kubeflow/tf-operator/master/manifests/tfjob-operator.yaml
kubectl get pods -n kubeflow -l app=tf-operator (adjust namespace if you installed elsewhere).Whether the TF‑Operator should be enabled by default depends on how you treat your Kubeflow manifests:
kfctl.yaml makes the CRD present in every clone of the repository, improving reproducibility.Toggling the operator changes the set of CRDs in the cluster; therefore, any CI/CD pipeline that assumes TFJob is available must either include the operator installation step or check for the CRD before submitting jobs.
kubectl get crd tfjobs.kubeflow.org --ignore-not-found and exits with a non‑zero code if the resource is absent.kubectl rollout status deployment/tf-operator -n kubeflow --timeout=60s.If you are using an older Kubeflow release (< 1.0), replace tfjobs.kubeflow.org with the appropriate CRD name under the kubeflow.org group (e.g., tfjobs.kubeflow.org still works but the API version differs). Confirm which API group your cluster expects by checking existing CRDs: kubectl get crd -o jsonpath='{.items[*].spec.names.kind}' | grep -i tfjob.
Use comments to ask for clarification. Post a solution as an answer.
35,775 reputation · 19 Aug 2026, 01:15 UTC
One point worth separating from the operator installation question: even after the Training Operator is running, a TFJob manifest can still fail with the same "no matches for kind" error if its apiVersion does not match the installed CRD. Early TFJob manifests often used v1beta2, while newer training-operator releases may register only v1 (or vice versa depending on the distribution). In Kubeflow 0.x, kfctl.yaml toggled the operator as an app, but in Kubeflow 1.x and later kfctl is deprecated and the operator is typically applied through upstream manifests or a distribution package, so the same kfctl-based workflow is not portable across versions.
For CI/CD, a pre-flight gate should assert both the CRD and the expected API version, not just the resource name. A conservative check is kubectl api-resources --api-group=kubeflow.org | grep TFJob followed by kubectl explain tfjob to confirm the version the cluster actually serves. Pinning the operator image tag and CRD apiVersion in version control avoids silent breakage when cluster components are upgraded.