创建无状态工作负载

<p class="shortdesc">本文主要介绍如何创建无状态工作负载。</p> <section class="section prereq" id="create_workload__prereq_rtm_n2c_gsb"><div class="tasklabel"><h2 class="doc-tairway">前提条件</h2></div> <p class="p">您已成功创建Serverless集群,可参考<a class="xref" href="/ssr/help/management/PKS/Serverless.quickstart.create_serverless_cluster" target="_blank" rel="external noopener">创建Serverless集群</a>。</p> </section> <section><div class="tasklabel"><h2 class="doc-tairway">操作步骤</h2></div><ol class="ol steps"><li class="li step stepexpand"> <span class="ph cmd">登录<a class="xref" href="https://www.ocftcloud.com/console/pks/cluster" target="_blank" rel="external noopener">容器服务CaaS Serverless集群控制台</a>。</span> </li><li class="li step stepexpand"> <span class="ph cmd">单击左侧导航栏<span class="ph uicontrol">集群</span>,进入<span class="ph uicontrol">集群列表</span>页面。</span> </li><li class="li step stepexpand"> <span class="ph cmd">在目标地域中,单击目标集群名称,进入<span class="ph uicontrol">集群信息</span>页面。</span> </li><li class="li step stepexpand"> <span class="ph cmd">单击左侧导航栏<span class="ph menucascade"><span class="ph uicontrol">工作负载</span><abbr> > </abbr><span class="ph uicontrol">无状态</span></span>,进入<span class="ph uicontrol">无状态</span>工作负载页面。</span> </li><li class="li step stepexpand"> <span class="ph cmd">在页面右上角单击<span class="ph uicontrol">创建无状态工作负载</span>,进入无状态工作负创建页面。</span> </li><li class="li step stepexpand"> <span class="ph cmd">根据如下说明完成<span class="ph uicontrol">基础信息</span>配置。</span> <div class="itemgroup info"> <table class="table" id="create_workload__table_xqj_l15_rvb"><caption></caption><colgroup><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="create_workload__table_xqj_l15_rvb__entry__1"> <p class="p">配置项</p> </th> <th class="entry" id="create_workload__table_xqj_l15_rvb__entry__2"> <p class="p">说明</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__1 "> <p class="p">命名空间</p> </td> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__2 "> <p class="p">选择命名空间。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__1 "> <p class="p">工作负载名称</p> </td> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__2 "> <p class="p">设置无状态工作负载的名称。可以采用默认名称,也可自定义名称。自定义名称请输入6-63个字符,可以包含小写字母、数字和中划线(-),并以小写字母开头,以小写字母或者数字结尾。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__1 "> <p class="p">计费方式</p> </td> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__2 "> <p class="p">默认为按量计费,公测期间暂不收费。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__1 "> <p class="p">Pod数量</p> </td> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__2 "> <p class="p">输入创建工作负载的Pod副本数量,单次创建最多支持200个Pod实例。</p> <p class="p">因Pod IP从容器子网分配,请确保剩余IP数充足。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__1 "> <p class="p">标签</p> </td> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__2 "> <p class="p">为工作负载添加一个标签,标识该工作负载。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__1 "> <p class="p">注解</p> </td> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__2 "> <p class="p">为工作负载添加一个注解(annotation)。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__1 "> <p class="p">描述</p> </td> <td class="entry" headers="create_workload__table_xqj_l15_rvb__entry__2 "> <p class="p">输入无状态工作负载的描述信息。</p> </td> </tr> </tbody></table> </div> </li><li class="li step stepexpand"> <span class="ph cmd">单击<span class="ph uicontrol">下一步</span>,完成<span class="ph uicontrol">容器配置</span>。</span> <div class="itemgroup info"> <div class="note note note_note" id="create_workload__note_uzg_yyw_3sb"><span class="note__title">说明:</span> 在容器配置页签顶部单击<strong class="ph b">+</strong>,可为工作负载的Pod设置多个容器,包含普通容器和初始化容器。工作负载需至少包含一个普通容器。</div> <ul class="ul" id="create_workload__ul_z45_s2c_gsb"> <li class="li"> <span class="ph uicontrol">基本信息</span> <table class="table" id="create_workload__table_khh_p15_rvb"><caption></caption><colgroup><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="create_workload__table_khh_p15_rvb__entry__1"> <p class="p">配置项</p> </th> <th class="entry" id="create_workload__table_khh_p15_rvb__entry__2"> <p class="p">说明</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="create_workload__table_khh_p15_rvb__entry__1 "> <p class="p">容器名称</p> </td> <td class="entry" headers="create_workload__table_khh_p15_rvb__entry__2 "> <p class="p">设置容器名称,允许输入6~30个字符,可以包含小写英文字母、数字和中划线(-),并以小写字母开头,小写字母或者数字结尾。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_khh_p15_rvb__entry__1 "> <p class="p">镜像</p> </td> <td class="entry" headers="create_workload__table_khh_p15_rvb__entry__2 "> <p class="p">单击右侧<strong class="ph b">选择镜像</strong>,在<strong class="ph b">选择镜像</strong>页面,勾选您需要的镜像,单击<strong class="ph b">确定</strong>。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_khh_p15_rvb__entry__1 "> <p class="p">镜像版本</p> </td> <td class="entry" headers="create_workload__table_khh_p15_rvb__entry__2 "> <p class="p">选择镜像版本。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_khh_p15_rvb__entry__1 "> <p class="p">资源限制</p> </td> <td class="entry" headers="create_workload__table_khh_p15_rvb__entry__2 "> <p class="p">设置工作负载所能使用的资源上限,包括CPU、内存,防止占用过多资源。</p> <ul class="ul" id="create_workload__ul_lhh_p15_rvb"> <li class="li">若命名空间设置了资源配额和资源限制,当容器未配置资源限制时,将默认使用命名空间资源限制。</li> <li class="li">若容器不配置资源限制,容器的请求及限制均默认为2C4G。</li> </ul> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_khh_p15_rvb__entry__1 "> <p class="p">镜像拉取策略</p> </td> <td class="entry" headers="create_workload__table_khh_p15_rvb__entry__2 "> <p class="p">选择容器镜像拉取策略。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_khh_p15_rvb__entry__1 "> <p class="p">初始化容器</p> </td> <td class="entry" headers="create_workload__table_khh_p15_rvb__entry__2 "> <p class="p">选择容器是否为初始化容器。工作负载需至少包含一个普通容器。</p> <p class="p">初始化容器是一种特殊容器,在 Pod 内的应用容器启动之前运行,用于进行一些初始化操作。初始化容器可以包括一些应用镜像中不存在的实用工具和安装脚本。</p> </td> </tr> </tbody></table></li> <li class="li"> <span class="ph uicontrol">环境变量(可选)</span> <p class="p">通过键值对的形式为Pod配置环境变量。用于给Pod添加环境标志或传递配置等。环境变量的类型支持:自定义、配置项、密钥。</p></li> <li class="li"> <span class="ph uicontrol">存储配置(可选)</span><p class="p">用于给容器挂载额外存储,适用于需持久化存储的场景。</p><table class="table" id="create_workload__table_im3_z15_rvb"><caption></caption><colgroup><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="create_workload__table_im3_z15_rvb__entry__1"> <p class="p">配置项</p> </th> <th class="entry" id="create_workload__table_im3_z15_rvb__entry__2"> <p class="p">说明</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="create_workload__table_im3_z15_rvb__entry__1 "> <p class="p">类型</p> </td> <td class="entry" headers="create_workload__table_im3_z15_rvb__entry__2 "> <p class="p">选择存储配置类型:存储声明、配置项、密钥。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_im3_z15_rvb__entry__1 "> <p class="p">挂载源</p> </td> <td class="entry" headers="create_workload__table_im3_z15_rvb__entry__2 "> <p class="p">选择目标挂载源。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_im3_z15_rvb__entry__1 "> <p class="p">容器挂载路径</p> </td> <td class="entry" headers="create_workload__table_im3_z15_rvb__entry__2 "> <p class="p">输入容器挂载路径。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_im3_z15_rvb__entry__1 "> <p class="p">子路径</p> </td> <td class="entry" headers="create_workload__table_im3_z15_rvb__entry__2 "> <p class="p">即卷的子目录,并非指容器路径的子路径。</p> </td> </tr> </tbody></table> </li> <li class="li"> <span class="ph uicontrol"> 健康检查(可选)</span> <p class="p">选择是否开启健康检查,提供<strong class="ph b">存活探针检查</strong>和<strong class="ph b">就绪探针检查</strong>两种方式。</p><ul class="ul" id="create_workload__ul_inp_2b5_rvb"> <li class="li">存活探针检查:检查容器是否正常,不正常则重启容器。</li> <li class="li">就绪探针检查:检查容器是否就绪,未就绪则不转发流量到此容器。</li> </ul><p class="p">当前支持<strong class="ph b">TCP连接</strong>、<strong class="ph b">http请求</strong>和<strong class="ph b">命令行</strong>三种检查类型:</p><ul class="ul" id="create_workload__ul_m5k_hb5_rvb"> <li class="li">TCP连接:即向容器发送一个TCP Socket,Kubelet将尝试在指定端口上打开容器的套接字。 如果可以建立连接,容器则被认为是健康的,如果不能则被认为是失败的。</li> <li class="li">http请求:向容器发送一个http Get请求,来检测容器的健康情况。</li> <li class="li">命令行:通过在容器中执行探针检测命令,来检测容器的健康情况。</li> </ul><table class="table" id="create_workload__table_svw_hb5_rvb"><caption></caption><colgroup><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="create_workload__table_svw_hb5_rvb__entry__1"> <p class="p">配置项</p> </th> <th class="entry" id="create_workload__table_svw_hb5_rvb__entry__2"> <p class="p">说明</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__1 "> <p class="p">检查类型</p> </td> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__2 "> <p class="p">选择检查类型:TCP连接、http请求或命令行。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__1 "> <p class="p">延迟时间</p> </td> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__2 "> <p class="p">表示容器启动后第一次执行探测时需要等待的时长。</p> <p class="p">例如,设置延迟时间为15秒,表示容器启动后15秒才开始健康检查,该时间是预留给业务程序启动的时间。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__1 "> <p class="p">探测频率</p> </td> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__2 "> <p class="p">表示探测执行的时间间隔。</p> <p class="p">例如,探测频率设置为10秒,表示每10秒执行一次健康检查。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__1 "> <p class="p">超时时间</p> </td> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__2 "> <p class="p">表示探测执行的超时等待时间。</p> <p class="p">例如,超时时间设置为1秒,若探测执行时间超过1秒,则本次探测将被视为失败。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__1 "> <p class="p">健康阈值</p> </td> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__2 "> <p class="p">表示最少连续探测成功多少次才被认定为成功。</p> <div class="note note note_note" id="create_workload__note_rnr_kb5_rvb"><span class="note__title">说明:</span> 存活探针健康检查健康阈值默认为1,不可更改。</div> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__1 "> <p class="p">不健康阈值</p> </td> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__2 "> <p class="p">表示最少连续探测失败多少次才被认定为失败。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__1 "> <p class="p">协议</p> </td> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__2 "> <div class="note note note_note" id="create_workload__note_jkf_lb5_rvb"><span class="note__title">说明:</span> 检查类型为<strong class="ph b">http请求</strong>时,需选择协议:HTTP或HTTPS。</div> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__1 "> <p class="p">请求路径</p> </td> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__2 "> <div class="note note note_note" id="create_workload__note_eqm_lb5_rvb"><span class="note__title">说明:</span> 检查类型为<strong class="ph b">Http请求</strong>时,需设置请求路径。</div> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__1 "> <p class="p">容器端口</p> </td> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__2 "> <p class="p">检查类型为<strong class="ph b">TCP连接</strong>或<strong class="ph b">http请求</strong>时,需设置探测检查的端口。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__1 "> <p class="p">http头</p> </td> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__2 "> <p class="p">检查类型为<strong class="ph b">http请求</strong>时,可设置http头。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__1 "> <p class="p">命令行</p> </td> <td class="entry" headers="create_workload__table_svw_hb5_rvb__entry__2 "> <p class="p">检查类型为<strong class="ph b">命令行</strong>时,需设置命令行。</p> </td> </tr> </tbody></table></li> <li class="li"><strong class="ph b">生命周期(可选)</strong><p class="p">创建工作负载时,可通过镜像指定容器中运行的进程。在默认情况下,镜像会运行默认命令,如果想运行特定命令或重写镜像默认值,可以配置容器生命周期。</p><p class="p">目前提供的生命周期回调函数包括:</p><ul class="ul" id="create_workload__ul_ixt_5b5_rvb"> <li class="li">启动执行:设置容器的预启动命令和参数。</li> <li class="li">启动后处理:设置容器启动后执行的命令。</li> <li class="li">停止前处理:设置容器结束前执行的命令,通常用于删除日志/临时文件等。</li> </ul></li> </ul> </div> </li><li class="li step stepexpand"> <span class="ph cmd">单击<span class="ph uicontrol">下一步</span>,完成<span class="ph uicontrol">高级配置</span>。</span> <div class="itemgroup info"> <ul class="ul"> <li class="li"> <span class="ph uicontrol">伸缩配置(可选)</span> <p class="p">容器弹性伸缩HPA开启后,可通过配置当前工作负载的Pod数量范围以及CPU或内存利用率阈值,在Pod数量范围内,CPU或内存利用率达到所设阈值时,工作负载的Pod数量将自动扩容或缩容,从而满足业务流量变化的自动扩缩需求。</p><div class="note note note_note" id="create_workload__note_yvx_1c5_rvb"><span class="note__title">说明:</span> <p class="p">容器弹性伸缩HPA功能需先安装Metrics-server监控组件。</p> </div><table class="table" id="create_workload__table_er5_fc5_rvb"><caption></caption><colgroup><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="create_workload__table_er5_fc5_rvb__entry__1"> <p class="p">配置项</p> </th> <th class="entry" id="create_workload__table_er5_fc5_rvb__entry__2"> <p class="p">说明</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="create_workload__table_er5_fc5_rvb__entry__1 "> <p class="p">HPA名称</p> </td> <td class="entry" headers="create_workload__table_er5_fc5_rvb__entry__2 "> <p class="p">设置HPA名称。请输入6-63个字符,可以包含小写英文字母、数字和中划线(-),并以小写字母开头,小写字母或者数字结尾。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_er5_fc5_rvb__entry__1 "> <p class="p">最小Pod数</p> </td> <td class="entry" headers="create_workload__table_er5_fc5_rvb__entry__2 "> <p class="p">设置最小Pod数。支持输入最小为1最大为100的整数。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_er5_fc5_rvb__entry__1 "> <p class="p">最大Pod数</p> </td> <td class="entry" headers="create_workload__table_er5_fc5_rvb__entry__2 "> <p class="p">设置最大Pod数。支持输入最小为1最大为200的整数,需大于最小Pod数。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_er5_fc5_rvb__entry__1 "> <p class="p">策略指标</p> </td> <td class="entry" headers="create_workload__table_er5_fc5_rvb__entry__2 "> <p class="p">设置容器弹性伸缩策略指标,支持设置CPU利用率、内存利用率。</p> </td> </tr> </tbody></table></li> <li class="li"> <span class="ph uicontrol">伸缩配置(可选)</span> <p class="p">容器弹性伸缩HPA开启后,可通过配置当前工作负载的Pod数量范围以及CPU或内存利用率阈值,在Pod数量范围内,CPU或内存利用率达到所设阈值时,工作负载的Pod数量将自动扩容或缩容,从而满足业务流量变化的自动扩缩需求。</p><div class="note note note_note" id="create_workload__note_kmn_nc5_rvb"><span class="note__title">说明:</span> <p class="p">容器弹性伸缩HPA功能需先安装Metrics-server监控组件。</p> </div><table class="table" id="create_workload__table_pk2_4c5_rvb"><caption></caption><colgroup><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="create_workload__table_pk2_4c5_rvb__entry__1"> <p class="p">配置项</p> </th> <th class="entry" id="create_workload__table_pk2_4c5_rvb__entry__2"> <p class="p">说明</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="create_workload__table_pk2_4c5_rvb__entry__1 "> <p class="p">HPA名称</p> </td> <td class="entry" headers="create_workload__table_pk2_4c5_rvb__entry__2 "> <p class="p">设置HPA名称。请输入6-63个字符,可以包含小写英文字母、数字和中划线(-),并以小写字母开头,小写字母或者数字结尾。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_pk2_4c5_rvb__entry__1 "> <p class="p">最小Pod数</p> </td> <td class="entry" headers="create_workload__table_pk2_4c5_rvb__entry__2 "> <p class="p">设置最小Pod数。支持输入最小为1最大为100的整数。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_pk2_4c5_rvb__entry__1 "> <p class="p">最大Pod数</p> </td> <td class="entry" headers="create_workload__table_pk2_4c5_rvb__entry__2 "> <p class="p">设置最大Pod数。支持输入最小为1最大为200的整数,需大于最小Pod数。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_pk2_4c5_rvb__entry__1 "> <p class="p">策略指标</p> </td> <td class="entry" headers="create_workload__table_pk2_4c5_rvb__entry__2 "> <p class="p">设置容器弹性伸缩策略指标,支持设置CPU利用率、内存利用率。</p> </td> </tr> </tbody></table></li> <li class="li"> <p class="p"> <span class="ph uicontrol">调度配置(可选)</span> </p> <p class="p">调度配置支持设置为工作负载配置升级策略,即Pod滚动更新策略,可依据业务需求使用默认更新策略,或进行自定义配置。</p> <table class="table" id="create_workload__table_py3_tc5_rvb"><caption></caption><colgroup><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="create_workload__table_py3_tc5_rvb__entry__1"> <p class="p">配置项</p> </th> <th class="entry" id="create_workload__table_py3_tc5_rvb__entry__2"> <p class="p">说明</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="create_workload__table_py3_tc5_rvb__entry__1 "> <p class="p">更新方式</p> </td> <td class="entry" headers="create_workload__table_py3_tc5_rvb__entry__2 "> <p class="p">设置工作负载更新的策略:</p> <p class="p"><strong class="ph b">滚动更新(Rolling Update)</strong>:分批次逐步替换工作负载的Pod实例。</p> <p class="p"><strong class="ph b">全部重建(Recreat)</strong>:先删除旧工作负载的全部Pod,再启动相同数量的Pod。</p> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_py3_tc5_rvb__entry__1 "> <p class="p">更新策略</p> </td> <td class="entry" headers="create_workload__table_py3_tc5_rvb__entry__2 "> <p class="p">更新方式为<strong class="ph b">滚动更新</strong>时,需设置滚动更新Pod的替换策略。</p> <div class="note note note_note" id="create_workload__note_rwc_wc5_rvb"><span class="note__title">说明:</span> 自定义策略遵循先启动新Pod,再删除旧Pod策略。</div> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_py3_tc5_rvb__entry__1 "> <p class="p">策略配置</p> </td> <td class="entry" headers="create_workload__table_py3_tc5_rvb__entry__2 "> <p class="p">更新方式为<strong class="ph b">滚动更新</strong>时,需配置Pod最大不可用数量和Pod最大超过期望数量:</p> <ul class="ul" id="create_workload__ul_qy3_tc5_rvb"> <li class="li"><strong class="ph b">Pod最大不可用数量</strong>:用于指定更新过程中不可用Pod的个数上限。</li> <li class="li"><strong class="ph b">Pod最大超过期望数量</strong>:用于指定可以创建的超出期望Pod个数的Pod数量。</li> </ul> <div class="note note note_note" id="create_workload__note_dwx_5c5_rvb"><span class="note__title">说明:</span> Pod最大不可用数量与Pod最大超过期望数量不可同时为0。</div> </td> </tr> <tr class="row"> <td class="entry" headers="create_workload__table_py3_tc5_rvb__entry__1 "> <p class="p">最小准备时长</p> </td> <td class="entry" headers="create_workload__table_py3_tc5_rvb__entry__2 "> <p class="p">设置Pod的最小准备时长(MinReadySeconds)。指在Pod被视为就绪之前,Pod中的容器至少需要运行的时长,默认为 0。</p> </td> </tr> </tbody></table> </li> <li class="li"> <span class="ph uicontrol">Pod标签和注解(可选)</span> <p class="p">配置Pod的标签和注解</p><table class="table" id="create_workload__table_dt4_nfc_gsb"><caption></caption><colgroup><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry colsep-1 rowsep-1" id="create_workload__table_dt4_nfc_gsb__entry__1"> <p class="p">配置项</p> </th> <th class="entry colsep-1 rowsep-1" id="create_workload__table_dt4_nfc_gsb__entry__2"> <p class="p">说明</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry colsep-1 rowsep-1" headers="create_workload__table_dt4_nfc_gsb__entry__1 "> <p class="p"> Pod标签 </p> </td> <td class="entry colsep-1 rowsep-1" headers="create_workload__table_dt4_nfc_gsb__entry__2 "> <p class="p">为Pod添加一个标签,标识该工作负载的Pod。</p> </td> </tr> <tr class="row"> <td class="entry colsep-1 rowsep-1" headers="create_workload__table_dt4_nfc_gsb__entry__1 "> <p class="p"> Pod注解 </p> </td> <td class="entry colsep-1 rowsep-1" headers="create_workload__table_dt4_nfc_gsb__entry__2 "> <p class="p">为Pod添加一个注解(Annotation)。</p> </td> </tr> </tbody></table></li> </ul> </div> </li><li class="li step stepexpand"> <span class="ph cmd">确认配置无误后,单击<span class="ph uicontrol">创建</span>。</span> </li></ol></section> <section class="section result"><div class="tasklabel"><h2 class="doc-tairway">执行结果</h2></div> <p class="p">在无状态工作负载列表,可以查看到刚刚创建的无状态工作负载。</p> </section>
以上内容是否解决了您的问题?
请补全提交信息!
联系我们

电话咨询

400-151-8800

邮件咨询

fincloud@ocft.com

在线客服

工单支持

解决云产品相关技术问题