You need to enable JavaScript to run this app.
文档中心
持续交付

持续交付

复制全文
下载 pdf
步骤列表
资源部署
复制全文
下载 pdf
资源部署
部署步骤用于将构建产物发布到目标资源。​
Kubectl 发布​
使用 kubectl apply 命令,将指定的 Kubernetes YAML 清单部署到目标集群。​
  • 组件:kubectl-deploy-yaml@1.0.0​
  • 参数:​
  • ​
    参数​
    数据类型​
    是否必填​
    默认值​
    说明​
    deployResource​
    string​
    是​
    -​
    目标 Kubernetes 集群的服务连接 ID。​
    yamlManifest.type​
    enum​
    是​
    -​
    清单类型,支持以下取值:​
    • Path:指向文件路径。​
    • File:内联 YAML 内容。​
    yamlManifest.content​
    string​
    是​
    -​
    Kubernetes YAML 资源清单的内容。​
    • type 为Path:填写内容的文件路径。​
    • type 为File:填写内容的 YAML 文本。​
    variables​
    list​
    否​
    []​
    变量替换规则列表,用于动态替换 YAML 中的占位符。每项包含 key 和 value。​
    ​
  • 示例:​
  • ​
    tasks:​
    - task: task-kubectl-path​
    displayName: Kubectl Deploy (File Path)​
    steps:​
    - step: step-kubectl-path​
    component: kubectl-deploy-yaml@1.0.0​
    inputs:​
    deployResource: my-k8s-cluster-connection​
    yamlManifest:​
    type: Path​
    content: k8s/deployment.yaml​
    variables:​
    - key: image​
    value: demo:v1​
    ​
最近更新时间:2026.05.11 11:33:37
这个页面对您有帮助吗?
有用
有用
无用
无用