All Products
Search
Document Center

Container Service for Kubernetes:Configure artifacts

Last Updated:Jun 25, 2026

Artifacts let workflow steps pass parameters: one step's output can become another step's input, enabling complex multi-step orchestration. This topic explains how to use Alibaba Cloud OSS as the Artifacts store and pass data between workflow steps.

Prerequisites

Configure OSS as the artifact backend and run a workflow

Configure OSS as the artifact repository

Configure Alibaba Cloud OSS as the artifact storage backend for your workflow cluster.

Create the workflow definition

Create a file named artifact-passing.yaml:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: artifact-passing-
spec:
  entrypoint: artifact-example
  templates:
  - name: artifact-example
    steps:
    - - name: generate-artifact
        template: whalesay
    - - name: consume-artifact
        template: print-message
        arguments:
          artifacts:
          # bind message to the hello-art artifact
          # generated by the generate-artifact step
          - name: message
            from: "{{steps.generate-artifact.outputs.artifacts.hello-art}}"

  - name: whalesay
    container:
      image: docker/whalesay:latest
      command: [sh, -c]
      args: ["cowsay hello world | tee /tmp/hello_world.txt"]
    outputs:
      artifacts:
      # generate hello-art artifact from /tmp/hello_world.txt
      # artifacts can be directories as well as files
      - name: hello-art
        path: /tmp/hello_world.txt

  - name: print-message
    inputs:
      artifacts:
      # unpack the message input artifact
      # and place it at /tmp/message
      - name: message
        path: /tmp/message
    container:
      image: alpine:latest
      command: [sh, -c]
      args: ["cat /tmp/message"]

This workflow runs two steps:

  • The whalesay template runs cowsay hello world, writes output to /tmp/hello_world.txt, and packages it as artifact hello-art.

  • The print-message template receives hello-art (via {{steps.generate-artifact.outputs.artifacts.hello-art}}), unpacks it to /tmp/message, and prints its contents.

Submit the workflow

argo submit artifact-passing.yaml

Check the workflow status

argo list

Next steps