如何在 Cloud Composer 2 的 KerbenetesPodOperator 中指定非默认计算类

问题描述 投票:0回答:1

我在 Cloud Composer 2 中使用 KurbenetesPodOperator 创建 Pod 来执行 Spark 作业。 默认情况下,当您使用 KubernetesPodOperator 创建 Pod 时,假定为compute_class 通用类。 我希望 KurbenetesPodOperator 请求在 Balanced Class 节点中创建 pod。

我浏览了这些文章12

我尝试添加节点亲和性。

"nodeAffinity": {
            "requiredDuringSchedulingIgnoredDuringExecution": {
                "nodeSelectorTerms": [
                    {
                       "matchExpressions": [
                            {
                                "key": "cloud.google.com/compute-class",
                                "operator": "In",
                                "values": ["Balanced"],
                            }
                        ]
                   }
                ]
            }

收到以下错误。

Pod 'r-migrations-8u8idq49' specifies non-default compute class. Cloud Composer 2 does not support creating workloads with non-default compute classes.
kubernetes specifications google-cloud-composer affinity
1个回答
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.