52 lines
1.1 KiB
Plaintext
52 lines
1.1 KiB
Plaintext
{
|
|
"apiVersion": "v1",
|
|
"kind": "Pod",
|
|
"metadata": {"name":"etcd-server"},
|
|
"spec":{
|
|
"hostNetwork": true,
|
|
"containers":[
|
|
{
|
|
"name": "etcd-container",
|
|
"image": "gcr.io/google_containers/etcd:2.0.12",
|
|
"resources": {
|
|
"limits": {
|
|
"cpu": "200m"
|
|
}
|
|
},
|
|
"command": [
|
|
"/bin/sh",
|
|
"-c",
|
|
"/usr/local/bin/etcd --addr 127.0.0.1:4001 --bind-addr 127.0.0.1:4001 --data-dir /var/etcd/data 1>>/var/log/etcd.log 2>&1"
|
|
],
|
|
"ports":[
|
|
{ "name": "serverport",
|
|
"containerPort": 2380,
|
|
"hostPort": 2380},{
|
|
"name": "clientport",
|
|
"containerPort": 4001,
|
|
"hostPort": 4001}
|
|
],
|
|
"volumeMounts": [
|
|
{"name": "varetcd",
|
|
"mountPath": "/var/etcd",
|
|
"readOnly": false
|
|
},
|
|
{"name": "varlogetcd",
|
|
"mountPath": "/var/log/etcd.log",
|
|
"readOnly": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"volumes":[
|
|
{ "name": "varetcd",
|
|
"hostPath": {
|
|
"path": "/mnt/master-pd/var/etcd"}
|
|
},
|
|
{ "name": "varlogetcd",
|
|
"hostPath": {
|
|
"path": "/var/log/etcd.log"}
|
|
}
|
|
]
|
|
}}
|