etcd.yaml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: etcd
  5. namespace: discov
  6. spec:
  7. ports:
  8. - name: etcd-port
  9. port: 2379
  10. protocol: TCP
  11. targetPort: 2379
  12. selector:
  13. app: etcd
  14. ---
  15. apiVersion: v1
  16. kind: Pod
  17. metadata:
  18. labels:
  19. app: etcd
  20. etcd_node: etcd0
  21. name: etcd0
  22. namespace: discov
  23. spec:
  24. containers:
  25. - command:
  26. - /usr/local/bin/etcd
  27. - --name
  28. - etcd0
  29. - --initial-advertise-peer-urls
  30. - http://etcd0:2380
  31. - --listen-peer-urls
  32. - http://0.0.0.0:2380
  33. - --listen-client-urls
  34. - http://0.0.0.0:2379
  35. - --advertise-client-urls
  36. - http://etcd0:2379
  37. - --initial-cluster
  38. - etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
  39. - --initial-cluster-state
  40. - new
  41. image: quay.io/coreos/etcd:latest
  42. name: etcd0
  43. ports:
  44. - containerPort: 2379
  45. name: client
  46. protocol: TCP
  47. - containerPort: 2380
  48. name: server
  49. protocol: TCP
  50. restartPolicy: Always
  51. ---
  52. apiVersion: v1
  53. kind: Service
  54. metadata:
  55. labels:
  56. etcd_node: etcd0
  57. name: etcd0
  58. namespace: discov
  59. spec:
  60. ports:
  61. - name: client
  62. port: 2379
  63. protocol: TCP
  64. targetPort: 2379
  65. - name: server
  66. port: 2380
  67. protocol: TCP
  68. targetPort: 2380
  69. selector:
  70. etcd_node: etcd0
  71. ---
  72. apiVersion: v1
  73. kind: Pod
  74. metadata:
  75. labels:
  76. app: etcd
  77. etcd_node: etcd1
  78. name: etcd1
  79. namespace: discov
  80. spec:
  81. containers:
  82. - command:
  83. - /usr/local/bin/etcd
  84. - --name
  85. - etcd1
  86. - --initial-advertise-peer-urls
  87. - http://etcd1:2380
  88. - --listen-peer-urls
  89. - http://0.0.0.0:2380
  90. - --listen-client-urls
  91. - http://0.0.0.0:2379
  92. - --advertise-client-urls
  93. - http://etcd1:2379
  94. - --initial-cluster
  95. - etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
  96. - --initial-cluster-state
  97. - new
  98. image: quay.io/coreos/etcd:latest
  99. name: etcd1
  100. ports:
  101. - containerPort: 2379
  102. name: client
  103. protocol: TCP
  104. - containerPort: 2380
  105. name: server
  106. protocol: TCP
  107. restartPolicy: Always
  108. ---
  109. apiVersion: v1
  110. kind: Service
  111. metadata:
  112. labels:
  113. etcd_node: etcd1
  114. name: etcd1
  115. namespace: discov
  116. spec:
  117. ports:
  118. - name: client
  119. port: 2379
  120. protocol: TCP
  121. targetPort: 2379
  122. - name: server
  123. port: 2380
  124. protocol: TCP
  125. targetPort: 2380
  126. selector:
  127. etcd_node: etcd1
  128. ---
  129. apiVersion: v1
  130. kind: Pod
  131. metadata:
  132. labels:
  133. app: etcd
  134. etcd_node: etcd2
  135. name: etcd2
  136. namespace: discov
  137. spec:
  138. containers:
  139. - command:
  140. - /usr/local/bin/etcd
  141. - --name
  142. - etcd2
  143. - --initial-advertise-peer-urls
  144. - http://etcd2:2380
  145. - --listen-peer-urls
  146. - http://0.0.0.0:2380
  147. - --listen-client-urls
  148. - http://0.0.0.0:2379
  149. - --advertise-client-urls
  150. - http://etcd2:2379
  151. - --initial-cluster
  152. - etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
  153. - --initial-cluster-state
  154. - new
  155. image: quay.io/coreos/etcd:latest
  156. name: etcd2
  157. ports:
  158. - containerPort: 2379
  159. name: client
  160. protocol: TCP
  161. - containerPort: 2380
  162. name: server
  163. protocol: TCP
  164. restartPolicy: Always
  165. ---
  166. apiVersion: v1
  167. kind: Service
  168. metadata:
  169. labels:
  170. etcd_node: etcd2
  171. name: etcd2
  172. namespace: discov
  173. spec:
  174. ports:
  175. - name: client
  176. port: 2379
  177. protocol: TCP
  178. targetPort: 2379
  179. - name: server
  180. port: 2380
  181. protocol: TCP
  182. targetPort: 2380
  183. selector:
  184. etcd_node: etcd2
  185. ---
  186. apiVersion: v1
  187. kind: Pod
  188. metadata:
  189. labels:
  190. app: etcd
  191. etcd_node: etcd3
  192. name: etcd3
  193. namespace: discov
  194. spec:
  195. containers:
  196. - command:
  197. - /usr/local/bin/etcd
  198. - --name
  199. - etcd3
  200. - --initial-advertise-peer-urls
  201. - http://etcd3:2380
  202. - --listen-peer-urls
  203. - http://0.0.0.0:2380
  204. - --listen-client-urls
  205. - http://0.0.0.0:2379
  206. - --advertise-client-urls
  207. - http://etcd3:2379
  208. - --initial-cluster
  209. - etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
  210. - --initial-cluster-state
  211. - new
  212. image: quay.io/coreos/etcd:latest
  213. name: etcd3
  214. ports:
  215. - containerPort: 2379
  216. name: client
  217. protocol: TCP
  218. - containerPort: 2380
  219. name: server
  220. protocol: TCP
  221. restartPolicy: Always
  222. ---
  223. apiVersion: v1
  224. kind: Service
  225. metadata:
  226. labels:
  227. etcd_node: etcd3
  228. name: etcd3
  229. namespace: discov
  230. spec:
  231. ports:
  232. - name: client
  233. port: 2379
  234. protocol: TCP
  235. targetPort: 2379
  236. - name: server
  237. port: 2380
  238. protocol: TCP
  239. targetPort: 2380
  240. selector:
  241. etcd_node: etcd3
  242. ---
  243. apiVersion: v1
  244. kind: Pod
  245. metadata:
  246. labels:
  247. app: etcd
  248. etcd_node: etcd4
  249. name: etcd4
  250. namespace: discov
  251. spec:
  252. containers:
  253. - command:
  254. - /usr/local/bin/etcd
  255. - --name
  256. - etcd4
  257. - --initial-advertise-peer-urls
  258. - http://etcd4:2380
  259. - --listen-peer-urls
  260. - http://0.0.0.0:2380
  261. - --listen-client-urls
  262. - http://0.0.0.0:2379
  263. - --advertise-client-urls
  264. - http://etcd4:2379
  265. - --initial-cluster
  266. - etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
  267. - --initial-cluster-state
  268. - new
  269. image: quay.io/coreos/etcd:latest
  270. name: etcd4
  271. ports:
  272. - containerPort: 2379
  273. name: client
  274. protocol: TCP
  275. - containerPort: 2380
  276. name: server
  277. protocol: TCP
  278. restartPolicy: Always
  279. ---
  280. apiVersion: v1
  281. kind: Service
  282. metadata:
  283. labels:
  284. etcd_node: etcd4
  285. name: etcd4
  286. namespace: discov
  287. spec:
  288. ports:
  289. - name: client
  290. port: 2379
  291. protocol: TCP
  292. targetPort: 2379
  293. - name: server
  294. port: 2380
  295. protocol: TCP
  296. targetPort: 2380
  297. selector:
  298. etcd_node: etcd4