Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是什么导致此Kubernetes清单验证失败?_Kubernetes_Kubernetes Helm - Fatal编程技术网

是什么导致此Kubernetes清单验证失败?

是什么导致此Kubernetes清单验证失败?,kubernetes,kubernetes-helm,Kubernetes,Kubernetes Helm,我正在尝试将Helm(v2.4.1)Tiller安装到Kubernetes集群(v1.5.7)中。这需要能够在非internet环境中完成,因此我想从helm init--dry run--debug获取Tiller部署的清单。但是,当我将清单复制到名为tiller.yaml的文件中,然后运行kubectl create-f tiller.yaml时,我得到如下所示的验证错误。请问文件有什么问题 error validating "tiller.yaml": error validating d

我正在尝试将Helm(v2.4.1)Tiller安装到Kubernetes集群(v1.5.7)中。这需要能够在非internet环境中完成,因此我想从
helm init--dry run--debug
获取Tiller部署的清单。但是,当我将清单复制到名为
tiller.yaml
的文件中,然后运行
kubectl create-f tiller.yaml
时,我得到如下所示的验证错误。请问文件有什么问题

error validating "tiller.yaml": error validating data: [found invalid field labels for v1beta1.Deployment, found invalid field name for v1beta1.Deployment, found invalid field namespace for v1beta1.Deployment, found invalid field Spec for v1beta1.Deployment, found invalid field Status for v1beta1.Deployment, found invalid field creationTimestamp for v1beta1.Deployment]; if you choose to ignore these errors, turn validation off with --validate=false
tiller.yaml:

apiVersion: extensions/v1beta1
kind: Deployment
Spec:
  MinReadySeconds: 0
  Paused: false
  ProgressDeadlineSeconds: null
  Replicas: 1
  RevisionHistoryLimit: null
  RollbackTo: null
  Selector: null
  Strategy:
    RollingUpdate: null
    Type: ""
  Template:
    Spec:
      ActiveDeadlineSeconds: null
      Affinity: null
      AutomountServiceAccountToken: null
      Containers:
      - Args: null
        Command: null
        Env:
        - Name: TILLER_NAMESPACE
          Value: kube-system
          ValueFrom: null
        EnvFrom: null
        Image: gcr.io/kubernetes-helm/tiller:v2.4.1
        ImagePullPolicy: IfNotPresent
        Lifecycle: null
        LivenessProbe:
          Exec: null
          FailureThreshold: 0
          HTTPGet:
            HTTPHeaders: null
            Host: ""
            Path: /liveness
            Port: 44135
            Scheme: ""
          InitialDelaySeconds: 1
          PeriodSeconds: 0
          SuccessThreshold: 0
          TCPSocket: null
          TimeoutSeconds: 1
        Name: tiller
        Ports:
        - ContainerPort: 44134
          HostIP: ""
          HostPort: 0
          Name: tiller
          Protocol: ""
        ReadinessProbe:
          Exec: null
          FailureThreshold: 0
          HTTPGet:
            HTTPHeaders: null
            Host: ""
            Path: /readiness
            Port: 44135
            Scheme: ""
          InitialDelaySeconds: 1
          PeriodSeconds: 0
          SuccessThreshold: 0
          TCPSocket: null
          TimeoutSeconds: 1
        Resources:
          Limits: null
          Requests: null
        SecurityContext: null
        Stdin: false
        StdinOnce: false
        TTY: false
        TerminationMessagePath: ""
        TerminationMessagePolicy: ""
        VolumeMounts: null
        WorkingDir: ""
      DNSPolicy: ""
      Hostname: ""
      ImagePullSecrets: null
      InitContainers: null
      NodeName: ""
      NodeSelector: null
      RestartPolicy: ""
      SchedulerName: ""
      SecurityContext:
        FSGroup: null
        HostIPC: false
        HostNetwork: false
        HostPID: false
        RunAsNonRoot: null
        RunAsUser: null
        SELinuxOptions: null
        SupplementalGroups: null
      ServiceAccountName: ""
      Subdomain: ""
      TerminationGracePeriodSeconds: null
      Tolerations: null
      Volumes: null
    creationTimestamp: null
    labels:
      app: helm
      name: tiller
Status:
  AvailableReplicas: 0
  Conditions: null
  ObservedGeneration: 0
  ReadyReplicas: 0
  Replicas: 0
  UnavailableReplicas: 0
  UpdatedReplicas: 0
creationTimestamp: null
labels:
  app: helm
  name: tiller
name: tiller-deploy
namespace: kube-system
---
apiVersion: v1
kind: Service
Spec:
  ClusterIP: ""
  ExternalIPs: null
  ExternalName: ""
  LoadBalancerIP: ""
  LoadBalancerSourceRanges: null
  Ports:
  - Name: tiller
    NodePort: 0
    Port: 44134
    Protocol: ""
    TargetPort: tiller
  Selector:
    app: helm
    name: tiller
  SessionAffinity: ""
  Type: ClusterIP
Status:
  LoadBalancer:
    Ingress: null
creationTimestamp: null
labels:
  app: helm
  name: tiller
name: tiller-deploy
namespace: kube-system

所有属性都应该以小写字母开头,creationTimestamp/labels/etc都应该出现在“元数据”小节中。这个清单是如何形成的?

它是通过运行
helm init--dry run--debug创建的。helm可能正在序列化API结构的内部版本。看起来这是在中报告的,可能是在中修复的