0
我YAML文件:未能就谷歌容器引擎部署kubernetes控制器
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 locust-master-controller.yaml
給出:
錯誤:錯誤驗證 「蝗蟲主controller.yaml」:錯誤數據驗證: [發現v1.EnvVar的無效字段鍵,發現v1.EnvVar的無效字段鍵];如果您選擇忽略這些錯誤,請重新確認了與--validate =假
我基本上按照指示字一個字上: https://github.com/GoogleCloudPlatform/distributed-load-testing-using-kubernetes
你是對的,[你給出的鏈接]中的文檔存在錯誤(https://github.com/GoogleCloudPlatform/distributed-load-testing-using-kubernetes)。 –
發送PR修復這些文檔:https://github.com/GoogleCloudPlatform/distributed-load-testing-using-kubernetes/pull/18 –