Kubeflow Mnist示例-无法识别“ STDIN”:版本“ kubeflow.org/v1beta2”中与“ TFJob”类型不匹配

时间:2019-10-31 23:07:57

标签: kubernetes kubeflow kustomize

下面的kubeflow mnist示例指南here

运行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" 我已经阅读了github repo上的几个线程,但找不到解决方案。寻找关于我能做什么的建议

大多数线程似乎可以通过更改为我使用的Kustomize 2.03版来解决

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

我跑了kubectl describe crd tfjobs.kubeflow.org,这就是返回的结果

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>

1 个答案:

答案 0 :(得分:0)

TFJob documentation中所述,因为kubeflow v0.7 apiVersionkubeflow.org/v1

要解决给定的错误,请运行kubectl edit tfjob,按iInsert键,然后将apiVersion:更改为kubeflow.org/v1。然后按ESC :wq退出编辑,TFJob对象将被更改。