podinfo-dep.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. ---
  2. apiVersion: extensions/v1beta1
  3. kind: Deployment
  4. metadata:
  5. name: podinfo
  6. spec:
  7. replicas: 2
  8. template:
  9. metadata:
  10. labels:
  11. app: podinfo
  12. annotations:
  13. prometheus.io/scrape: 'true'
  14. spec:
  15. containers:
  16. - name: podinfod
  17. image: stefanprodan/podinfo:0.0.1
  18. imagePullPolicy: Always
  19. command:
  20. - ./podinfo
  21. - -port=9898
  22. - -logtostderr=true
  23. - -v=2
  24. volumeMounts:
  25. - name: metadata
  26. mountPath: /etc/podinfod/metadata
  27. readOnly: true
  28. ports:
  29. - containerPort: 9898
  30. protocol: TCP
  31. readinessProbe:
  32. httpGet:
  33. path: /readyz
  34. port: 9898
  35. initialDelaySeconds: 1
  36. periodSeconds: 2
  37. failureThreshold: 1
  38. livenessProbe:
  39. httpGet:
  40. path: /healthz
  41. port: 9898
  42. initialDelaySeconds: 1
  43. periodSeconds: 3
  44. failureThreshold: 2
  45. resources:
  46. requests:
  47. memory: "32Mi"
  48. cpu: "1m"
  49. limits:
  50. memory: "256Mi"
  51. cpu: "100m"
  52. volumes:
  53. - name: metadata
  54. downwardAPI:
  55. items:
  56. - path: "labels"
  57. fieldRef:
  58. fieldPath: metadata.labels
  59. - path: "annotations"
  60. fieldRef:
  61. fieldPath: metadata.annotations