influxdb.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. apiVersion: extensions/v1beta1
  2. kind: Deployment
  3. metadata:
  4. name: influxdb
  5. namespace: power-monitoring
  6. spec:
  7. replicas: 1
  8. template:
  9. metadata:
  10. labels:
  11. task: monitoring
  12. k8s-app: influxdb
  13. spec:
  14. containers:
  15. - name: influxdb
  16. image: k8s.gcr.io/heapster-influxdb-amd64:v1.3.3
  17. volumeMounts:
  18. - mountPath: /data
  19. name: influxdb-storage
  20. volumes:
  21. - name: influxdb-storage
  22. persistentVolumeClaim:
  23. claimName: power-monitoring-influxdb
  24. ---
  25. apiVersion: v1
  26. kind: Service
  27. metadata:
  28. labels:
  29. task: monitoring
  30. name: influxdb
  31. namespace: power-monitoring
  32. spec:
  33. ports:
  34. - port: 8086
  35. targetPort: 8086
  36. selector:
  37. k8s-app: influxdb
  38. ---
  39. kind: PersistentVolumeClaim
  40. apiVersion: v1
  41. metadata:
  42. name: power-monitoring-influxdb
  43. namespace: power-monitoring
  44. spec:
  45. accessModes:
  46. - ReadWriteOnce
  47. storageClassName: local-storage
  48. resources:
  49. requests:
  50. storage: 20Gi
  51. ---
  52. apiVersion: v1
  53. kind: PersistentVolume
  54. metadata:
  55. name: power-monitoring-influxdb
  56. spec:
  57. capacity:
  58. storage: 20Gi
  59. accessModes:
  60. - ReadWriteOnce
  61. persistentVolumeReclaimPolicy: Retain
  62. storageClassName: local-storage
  63. local:
  64. path: /srv/power-monitoring-influxdb
  65. nodeAffinity:
  66. required:
  67. nodeSelectorTerms:
  68. - matchExpressions:
  69. - key: kubernetes.io/hostname
  70. operator: In
  71. values:
  72. - k8s