Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to recognize "STDIN": no matches for kind "TFJob" in version "kubeflow.org/v1beta2" #672

Closed
FrancisLennon17 opened this issue Oct 31, 2019 · 11 comments

Comments

@FrancisLennon17
Copy link

FrancisLennon17 commented Oct 31, 2019

Following this guide here

When running kustomize build . | kubectl apply -f -
configmap/mnist-map-training-45h47275m7 unchanged error: unable to recognize "STDIN": no matches for kind "TFJob" in version "kubeflow.org/v1beta2"
I've been reading through a couple of these threads and I can't find a solution. Looking for any advice on what I can do

Version: {KustomizeVersion:2.0.3 GitCommit:a6f65144121d1955266b0cd836ce954c04122dc8 BuildDate:2019-03-05T20:37:42Z GoOs:linux GoArch:amd64}

I ran kubectl describe crd tfjobs.kubeflow.org and this is what returned

Name:         tfjobs.kubeflow.org
Namespace:    
Labels:       app.kubernetes.io/component=tfjob
              app.kubernetes.io/instance=tf-job-crds-v0.7.0
              app.kubernetes.io/managed-by=kfctl
              app.kubernetes.io/name=tf-job-crds
              app.kubernetes.io/part-of=kubeflow
              app.kubernetes.io/version=v0.7.0
Annotations:  kubectl.kubernetes.io/last-applied-configuration:
                {"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"annotations":{},"labels":{"app.kubernetes.io/c...
API Version:  apiextensions.k8s.io/v1beta1
Kind:         CustomResourceDefinition
Metadata:
  Creation Timestamp:  2019-10-29T23:53:03Z
  Generation:          1
  Resource Version:    2620
  Self Link:           /apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/tfjobs.kubeflow.org
  UID:                 3eb96b55-faa7-11e9-9ab9-42010a840fdc
Spec:
  Additional Printer Columns:
    JSON Path:  .status.conditions[-1:].type
    Name:       State
    Type:       string
    JSON Path:  .metadata.creationTimestamp
    Name:       Age
    Type:       date
  Conversion:
    Strategy:  None
  Group:       kubeflow.org
  Names:
    Kind:       TFJob
    List Kind:  TFJobList
    Plural:     tfjobs
    Singular:   tfjob
  Scope:        Namespaced
  Subresources:
    Status:
  Validation:
    openAPIV3Schema:
      Properties:
        Spec:
          Properties:
            Tf Replica Specs:
              Properties:
                Chief:
                  Properties:
                    Replicas:
                      Maximum:  1
                      Minimum:  1
                      Type:     integer
                PS:
                  Properties:
                    Replicas:
                      Minimum:  1
                      Type:     integer
                Worker:
                  Properties:
                    Replicas:
                      Minimum:  1
                      Type:     integer
  Version:                      v1
  Versions:
    Name:     v1
    Served:   true
    Storage:  true
Status:
  Accepted Names:
    Kind:       TFJob
    List Kind:  TFJobList
    Plural:     tfjobs
    Singular:   tfjob
  Conditions:
    Last Transition Time:  2019-10-29T23:53:03Z
    Message:               no conflicts found
    Reason:                NoConflicts
    Status:                True
    Type:                  NamesAccepted
    Last Transition Time:  <nil>
    Message:               the initial names have been accepted
    Reason:                InitialNamesAccepted
    Status:                True
    Type:                  Established
  Stored Versions:
    v1
Events:  <none>

@issue-label-bot
Copy link

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

@ryandawsonuk
Copy link

ryandawsonuk commented Nov 21, 2019

I think this is because TFJob in kubeflow 0.7.0 is now v1, not v1beta2 - the example is out of date

@plaffitte
Copy link

I have the same issue. Any way to solve it?
Tried replacing version: v1beta2 with version: v1 in kustomization.yaml but then got another error:
Error: couldn't find target kubeflow.org_v1_TFJob|~X|~P|$(trainingName)|~S for json patch

@FrancisLennon17
Copy link
Author

FrancisLennon17 commented Dec 9, 2019

@plaffitte Sorry for the delay, It worked for me after replacing version: v1beta2 with version: v1 in all of the yaml files

@plaffitte
Copy link

@FrancisLennon17 no worries, it also ended up working for me but I'm not sure why now... I had probably forgotten to make the change in some places

@plaffitte
Copy link

@FrancisLennon17 I'm actually running into the issue again and I don't know how to solve it since last time it just went away without my understanding why....
So I have replaced all the version: v1beta2 with version: v1 in all yaml files but now I get the following error:
no matches for kind "TFJob" in version "kubeflow.org/v1"

@FrancisLennon17
Copy link
Author

if you run the command kubectl describe crd tfjobs.kubeflow.org, it describes the version of the TFJob CRD that is being used in Kubeflow. Mine says v1 under spec/versions. ALL of the yaml files that use the kind: TFJob must match the version.

Where you originally said you changed version: v1beta2 to version: v1, do you mean you're changing the apiVersion: kubeflow.org/v1beta2 to apiVersion: kubeflow.org/v1? As its the apiVersion for the TFJobs you're to change.

The repository has already been updated it seems to the correct versions as you can see in this merged pull request https://github.com/kubeflow/examples/pull/684/files#diff-22add3960bd77cf1e25fdf202caf83b7L1

@FrancisLennon17
Copy link
Author

@plaffitte ^^. However if it is a different issue and you find the solution, please keep me updated

@plaffitte
Copy link

@FrancisLennon17 I figured it out... I had forgotten to re-deploy Kubeflow onto my cluster in the first place, that's why Kubernetes wasn't recognizing the TFJob type, since it's defined by Kubeflow...

@jtfogarty
Copy link

/area kustomize
/kind bug
/priority p2

@stale
Copy link

stale bot commented Apr 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot closed this as completed Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants