文章

Argo Workflows 3

1. k8s部署

安装kk

curl -sfL https://get-kk.kubesphere.io | sh -

安装依赖

更新yum依赖
root@home:~# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
root@home:~# yum install epel-release

yum install socat conntrack -y

设置hostname
root@home:~# hostnamectl set-hostname home

用一个命令中安装 Kubernetes 和 KubeSpher

安装要求:

https://github.com/kubesphere/kubekey/blob/master/README_zh-CN.md#%E8%A6%81%E6%B1%82%E5%92%8C%E5%BB%BA%E8%AE%AE

export KKZONE=cn
curl -sfL https://get-kk.kubesphere.io | sh -
./kk create cluster --with-kubesphere --container-manager containerd

2. argo-workflows部署

kubectl create namespace argo
kubectl apply -n argo -f https://github.com/argoproj/argo-workflows/releases/download/v3.5.7/install.yaml

#等待部署完成
kubectl -n argo wait deploy --all --for condition=Available --timeout 2m

3. 修改argo-workflows配置

  • 将身份验证模式切换到服务器,以便我们暂时可以绕过 UI 登录

  • 默认情况下,Argo Server 通过 https 运行。这与 Killercoda 不兼容,因此我们将同时禁用 https。我们不建议在生产安装中使用此功能。

kubectl patch deployment \
  argo-server \
  --namespace argo \
  --type='json' \
  -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args", "value": [
  "server",
  "--auth-mode=server",
  "--secure=false"
]},
{"op": "replace", "path": "/spec/template/spec/containers/0/readinessProbe/httpGet/scheme", "value": "HTTP"}
]'

等待 Argo Server 重新部署:

kubectl -n argo rollout status --watch --timeout=600s deployment/argo-server

转发端口以便访问界面

kubectl -n argo port-forward --address 0.0.0.0 svc/argo-server 2746:2746 > /dev/null &