我有文件example-workflow-cowsay.yml
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-world-
spec:
entrypoint: whalesay
templates:
- name: whalesay
container:
image: docker/whalesay
command: [cowsay]
args: ["hello world"]
resources:
limits:
memory: 32Mi
cpu: 100m我可以像这样成功地提交:argo submit -n workflows apps/workflows/example-workflow-cowsay.yml。
我能直接使用kubectl完成同样的事情吗?我试了一下,但失败了:
$ k apply -n workflows -f apps/workflows/example-workflow-cowsay.yml
error: from hello-world-: cannot use generate name with apply发布于 2022-04-26 11:29:22
kubectl -n workflows create -f apps/workflows/example-workflow-cowsay.yml完成了这项工作。
详细说明一下:这是有意义的,因为我试图“应用”的是工作流的单个运行(考虑对象实例而不是类)。如果我尝试应用CronWorkflow,那么kubectl apply就可以工作了。我得到的错误消息:
error: from hello-world-: cannot use generate name with apply告诉我了,但当时我不明白。这是无效的:
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
generateName: some-name
...但这是有效的:
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
name: some-name
...https://stackoverflow.com/questions/72013109
复制相似问题