如何将气流工作人员的体积安装到气流kubernetes吊舱操作员?

2024-05-15 23:19:24 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试在气流中使用kubernetes吊舱操作员,我希望在我的气流工作人员上与kubernetes吊舱共享一个目录,有没有办法将气流工作人员的目录安装到kubernetes吊舱?在

我尝试使用下面的代码,但卷似乎没有成功装入。在

^{1}$

Tags: 代码目录kubernetes工作人员气流办法操作员吊舱
1条回答
网友
1楼 · 发布于 2024-05-15 23:19:24

文档中的示例与您的代码非常相似,只是参数是复数volume_mountsvolumes。对于您的代码,它将如下所示:

self.operator = KubernetesPodOperator(
            namespace=self.namespace, image=self.image, name=self.name,
            cmds=self.cmds,
            arguments=self.arguments,
            startup_timeout_seconds=600,
            is_delete_operator_pod=True,
            # the operator could run successfully but the directory /tmp is not mounted to kubernetes operator
            volumes=[self.volume],
            volume_mounts=[self.volume_mount],
            **self.context)

相关问题 更多 >