etcd.yaml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: etcd-server
  5. spec:
  6. hostNetwork: true
  7. containers:
  8. - image: k8s.gcr.io/etcd:2.0.9
  9. name: etcd-container
  10. command:
  11. - /usr/local/bin/etcd
  12. - --name
  13. - ${NODE_NAME}
  14. - --initial-advertise-peer-urls
  15. - http://${NODE_IP}:2380
  16. - --listen-peer-urls
  17. - http://${NODE_IP}:2380
  18. - --advertise-client-urls
  19. - http://${NODE_IP}:2379
  20. - --listen-client-urls
  21. - http://127.0.0.1:2379
  22. - --data-dir
  23. - /var/etcd/data
  24. - --discovery
  25. - ${DISCOVERY_TOKEN}
  26. ports:
  27. - containerPort: 2380
  28. hostPort: 2380
  29. name: serverport
  30. - containerPort: 2379
  31. hostPort: 2379
  32. name: clientport
  33. volumeMounts:
  34. - mountPath: /var/etcd
  35. name: varetcd
  36. - mountPath: /etc/ssl
  37. name: etcssl
  38. readOnly: true
  39. - mountPath: /usr/share/ssl
  40. name: usrsharessl
  41. readOnly: true
  42. - mountPath: /var/ssl
  43. name: varssl
  44. readOnly: true
  45. - mountPath: /usr/ssl
  46. name: usrssl
  47. readOnly: true
  48. - mountPath: /usr/lib/ssl
  49. name: usrlibssl
  50. readOnly: true
  51. - mountPath: /usr/local/openssl
  52. name: usrlocalopenssl
  53. readOnly: true
  54. - mountPath: /etc/openssl
  55. name: etcopenssl
  56. readOnly: true
  57. - mountPath: /etc/pki/tls
  58. name: etcpkitls
  59. readOnly: true
  60. volumes:
  61. - hostPath:
  62. path: /var/etcd/data
  63. name: varetcd
  64. - hostPath:
  65. path: /etc/ssl
  66. name: etcssl
  67. - hostPath:
  68. path: /usr/share/ssl
  69. name: usrsharessl
  70. - hostPath:
  71. path: /var/ssl
  72. name: varssl
  73. - hostPath:
  74. path: /usr/ssl
  75. name: usrssl
  76. - hostPath:
  77. path: /usr/lib/ssl
  78. name: usrlibssl
  79. - hostPath:
  80. path: /usr/local/openssl
  81. name: usrlocalopenssl
  82. - hostPath:
  83. path: /etc/openssl
  84. name: etcopenssl
  85. - hostPath:
  86. path: /etc/pki/tls
  87. name: etcpkitls