4.taskmanager-session-deployment.beam.yaml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: flink-taskmanager
  5. spec:
  6. replicas: 2
  7. selector:
  8. matchLabels:
  9. app: flink
  10. component: taskmanager
  11. template:
  12. metadata:
  13. labels:
  14. app: flink
  15. component: taskmanager
  16. spec:
  17. containers:
  18. - name: taskmanager
  19. image: apache/flink:1.16.2-scala_2.12
  20. # image: apache/flink:1.10.3
  21. # image: apache/flink:1.12.0-scala_2.11
  22. args: ["taskmanager"]
  23. ports:
  24. - containerPort: 6122
  25. name: rpc
  26. - containerPort: 6125
  27. name: query-state
  28. livenessProbe:
  29. tcpSocket:
  30. port: 6122
  31. initialDelaySeconds: 30
  32. periodSeconds: 60
  33. resources:
  34. limits:
  35. memory: "8192Mi"
  36. cpu: "4000m"
  37. requests:
  38. memory: "1024Mi"
  39. cpu: "1000m"
  40. volumeMounts:
  41. - name: flink-config-volume
  42. mountPath: /opt/flink/conf/
  43. securityContext:
  44. runAsUser: 9999 # refers to user _flink_ from official flink image, change if necessary
  45. - name: beam-worker-pool
  46. image: apache/beam_python3.7_sdk
  47. args: ["--worker_pool"]
  48. ports:
  49. - containerPort: 50000
  50. name: pool
  51. livenessProbe:
  52. tcpSocket:
  53. port: 50000
  54. initialDelaySeconds: 30
  55. periodSeconds: 60
  56. resources:
  57. limits:
  58. memory: "8192Mi"
  59. cpu: "4000m"
  60. requests:
  61. memory: "1024Mi"
  62. cpu: "1000m"
  63. volumes:
  64. - name: flink-config-volume
  65. configMap:
  66. name: flink-config
  67. items:
  68. - key: flink-conf.yaml
  69. path: flink-conf.yaml
  70. - key: log4j-console.properties
  71. path: log4j-console.properties