Reputation: 402
my yaml file:
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
running kubectl create -f locust-master-controller.yaml
gives:
error: error validating "locust-master-controller.yaml": error validating data: [found invalid field key for v1.EnvVar, found invalid field key for v1.EnvVar]; if you choose to ignore these errors, turn validation off with --validate=false
I am basically following the instructions word for word on: https://github.com/GoogleCloudPlatform/distributed-load-testing-using-kubernetes
Upvotes: 0
Views: 93
Reputation: 8228
Just delete these two lines:
key: LOCUST_MODE
and
key: TARGET_HOST
.
There is no key called key
in the env
section. Complete documentation for env is here..
Upvotes: 2