首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >完备的kubernetes aks (azure)虚拟节点

完备的kubernetes aks (azure)虚拟节点
EN

Stack Overflow用户
提问于 2022-06-03 10:59:00
回答 1查看 83关注 0票数 1

在azure kubernetes (Ak)虚拟节点中运行prefect作业,除了添加推荐的nodeSelector/tolerations

代码语言:javascript
复制
"nodeSelector": {
    "kubernetes.io/role": "agent",
    "beta.kubernetes.io/os": "linux",
    "type": "virtual-kubelet",
},
"tolerations": [
    {"key": "virtual-kubelet.io/provider", "operator": "Exists"},
    {"key": "azure.com/aci", "effect": "NoSchedule"},
],

容器创建失败的原因如下:

代码语言:javascript
复制
Warning   ProviderCreateFailed   pod/prefect-job-XXXXX-XXXXX   ACI does not support providing args without specifying the command. Please supply both command and args to the pod spec.

command中声明的不同https://linen.prefect.io/t/48087/topic选项不起作用。

如何解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2022-06-03 10:59:00

代码语言:javascript
复制
command": ["tini", "-g", "--"],

解决了这个问题,并允许高级执行作业在aks虚拟节点中运行。

这里是一个工作的job_template的例子

代码语言:javascript
复制
{
    "apiVersion": "batch/v1",
    "kind": "Job",
    "spec": {
        "template": {
            "spec": {
                "containers": [
                    {
                        "name": "flow",
                        "command": ["tini", "-g", "--"],
                    }
                ],
                "nodeSelector": {
                    "kubernetes.io/role": "agent",
                    "beta.kubernetes.io/os": "linux",
                    "type": "virtual-kubelet",
                },
                "tolerations": [
                    {"key": "virtual-kubelet.io/provider", "operator": "Exists"},
                    {"key": "azure.com/aci", "effect": "NoSchedule"},
                ],
                "imagePullSecrets": [
                    {"name": "regcred"},
                ],
            },
        }
    },
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72488607

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档