{ "apiVersion": "v1", "kind": "Pod", "metadata": { "name":"etcd-server{{ suffix }}", "namespace": "kube-system" }, "spec":{ "hostNetwork": true, "containers":[ { "name": "etcd-container", "image": "gcr.io/google_containers/etcd:2.2.1", "resources": { "requests": { "cpu": {{ cpulimit }} } }, "command": [ "/bin/sh", "-c", "/usr/local/bin/etcd --listen-peer-urls http://127.0.0.1:{{ server_port }} --addr 127.0.0.1:{{ port }} --bind-addr 127.0.0.1:{{ port }} --data-dir /var/etcd/data{{ suffix }} 1>>/var/log/etcd{{ suffix }}.log 2>&1" ], "livenessProbe": { "httpGet": { "host": "127.0.0.1", "port": {{ port }}, "path": "/health" }, "initialDelaySeconds": 15, "timeoutSeconds": 15 }, "ports":[ { "name": "serverport", "containerPort": {{ server_port }}, "hostPort": {{ server_port }} },{ "name": "clientport", "containerPort": {{ port }}, "hostPort": {{ port }} } ], "volumeMounts": [ {"name": "varetcd", "mountPath": "/var/etcd", "readOnly": false }, {"name": "varlogetcd", "mountPath": "/var/log/etcd{{ suffix }}.log", "readOnly": false } ] } ], "volumes":[ { "name": "varetcd", "hostPath": { "path": "/mnt/master-pd/var/etcd"} }, { "name": "varlogetcd", "hostPath": { "path": "/var/log/etcd{{ suffix }}.log"} } ] }}