Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.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
Google cloud platform 未能在google容器引擎上部署kubernetes控制器_Google Cloud Platform_Kubernetes_Google Kubernetes Engine - Fatal编程技术网

Google cloud platform 未能在google容器引擎上部署kubernetes控制器

Google cloud platform 未能在google容器引擎上部署kubernetes控制器,google-cloud-platform,kubernetes,google-kubernetes-engine,Google Cloud Platform,Kubernetes,Google Kubernetes Engine,我的yaml文件: kind: ReplicationController apiVersion: v1 metadata: name: locust-master labels: name: locust role: master spec: replicas: 1 selector: name: locust role: master template: metadata: labels: name: l

我的yaml文件:

kind: ReplicationController
apiVersion: v1
metadata:
  name: locust-master
  labels:
    name: locust
    role: master
spec:
  replicas: 1
  selector:
    name: locust
    role: master
  template:
    metadata:
      labels:
        name: locust
        role: master
    spec:
      containers:
        - name: locust
          image: gcr.io/MY_PROJECT/locust-tasks:latest
          env:
            - name: LOCUST_MODE
              key: LOCUST_MODE
              value: master
            - name: TARGET_HOST
              key: TARGET_HOST
              value: http://MY_WEBSITE.io
          ports:
            - name: loc-master-web
              containerPort: 8089
              protocol: TCP
            - name: loc-master-p1
              containerPort: 5557
              protocol: TCP
            - name: loc-master-p2
              containerPort: 5558
              protocol: TCP
运行
kubectl create-f蝗虫主控制器.yaml
给出:

错误:验证“蝗虫主控制器.yaml”时出错:验证数据时出错:[找到v1.EnvVar的无效字段键,找到v1.EnvVar的无效字段键];如果选择忽略这些错误,请使用--validate=false关闭验证

我基本上是逐字逐句地遵循以下说明:
只需删除这两行:

关键词:蝗虫模式

关键字:目标主机


env
部分中没有名为
key
的键。完成。

只需删除这两行:

关键词:蝗虫模式

关键字:目标主机


env
部分中没有名为
key
的键。完成。

您是对的,中的文档中存在错误。已发送PR修复这些文档:您是对的,中的文档中存在错误。已发送PR修复这些文档: