您好:
这个需求是可以实现的,您可以在启动脚本中指定创建k8s
pod的模板:-Dkubernetes.pod-template-file=./pod-template.yaml,在模板中您需要使用nodeSelector来指定该容器部署到哪些节点,节点需要打上label,完整模板如下:
```
apiVersion: v1
kind: Pod
metadata:
name: flink-pod-template
spec:
nodeSelector:
disktype: "ssd"
containers:
# Do not change the main container name
- name: flink-main-container
resources:
requests:
ephemeral-storage: "2Gi"
limits:
ephemeral-storage: "2Gi"
volumeMounts:
- mountPath: /etc/localtime
name: host-time
readOnly: true
- mountPath: /opt/flink/log
name: flink-logs
volumes:
- name: host-time
hostPath:
path: /etc/localtime
type: ""
- name: flink-logs
emptyDir: {}
```
从 Windows 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>发送
发件人: casel.chen<mailto:[email protected]>
发送时间: 2021年12月27日 16:35
收件人: [email protected]<mailto:[email protected]>
主题: Flink on Native K8S作业节点调度问题
k8s集群有2个节点配置了SSD盘,其他节点是普通硬盘,希望实现配置了rocksdb状态后端类型的作业部署到这2个ssd节点,同时希望其他非rocksdb状态后端作业不会被调度到这2个ssd节点
请问:flink 1.13.2有办法实现吗?如果能实现的话,具体应该怎么操作呢?最好给个具体例子,谢谢!