1

在此处遵循 kubeflow mnist 示例指南

运行时,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>

4

1 回答 1

0

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

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

于 2019-11-12T15:49:19.050 回答