这里使用官方文档中的 docker/whalesay 来创建一个 helloworld 的 workflow
docker run docker/whalesay cowsay "hello world"
网络问题我手动下载镜像 (这里已经通过tag重命名了)
microk8s ctr image pull docker.io/docker/whalesay:latest
microk8s ctr image pull docker.io/libaibai/whalesay:latest
microk8s ctr image pull docker.io/argoproj/argoexec:v3.0.3
apiVersion: argoproj.io/v1alpha1
kind: Workflow # new type of k8s spec
metadata:
generateName: hello-world- # name of the workflow spec
namespace: argo
spec:
entrypoint: whalesay # invoke the whalesay template
templates:
- name: whalesay # name of the template
container:
image: docker/whalesay
command: [cowsay]
args: ["hello world"]
resources: # limit the resources
limits:
memory: 32Mi
cpu: 100m
出现了错误
Unable to attach or mount volumes: unmounted volumes=[docker-sock], unattached volumes=[kube-api-access-btrhw podmetadata docker-sock my-minio-cred]: timed out waiting for the condition
参考
https://argoproj.github.io/argo-workflows/workflow-executors/
https://argoproj.github.io/argo-workflows/workflow-controller-configmap.yaml
这里使用的是 microk8s ,没有docker.sock,只有 containerd.sock
/var/snap/microk8s/common/run/containerd.sock
这里我直接去按了一个docker
修改configmap
还是不好用,最后谢谢下面的大哥
https://discuss.kubernetes.io/t/issues-with-running-argo-against-microk8s-on-ubunte/13553
PNS 是好用的 Process Namespace Sharing
使用pns模式之后,正常工作