Argo HTTP工作流-无法获取令牌卷:服务帐户Argo/default没有任何机密



我是Argo的新手,遵循Quickstart模板,并希望将HTTP模板部署为工作流。

我这样创建集群:

minikube start --driver=docker --cpus='2' --memory='8g'
kubectl create ns argo
kubectl apply -n argo -f https://raw.githubusercontent.com/argoproj/argo-workflows/master/manifests/quick-start-postgres.yaml

然后,我应用文档中的HTTP模板http_template.yaml

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: http-template-
spec:
entrypoint: main
templates:
- name: main
steps:
- - name: get-google-homepage
template: http
arguments:
parameters: [ { name: url, value: "https://www.google.com" } ]
- name: http
inputs:
parameters:
- name: url
http:
timeoutSeconds: 20 # Default 30
url: "{{inputs.parameters.url}}"
method: "GET" # Default GET
headers:
- name: "x-header-name"
value: "test-value"
# Template will succeed if evaluated to true, otherwise will fail
# Available variables:
#  request.body: string, the request body
#  request.headers: map[string][]string, the request headers
#  response.url: string, the request url
#  response.method: string, the request method
#  response.statusCode: int, the response status code
#  response.body: string, the response body
#  response.headers: map[string][]string, the response headers
successCondition: "response.body contains "google"" # available since v3.3
body: "test body" # Change request body

argo submit -n argo http_template.yaml --watch

然而,我得到以下错误:

Name:                http-template-564qp
Namespace:           argo
ServiceAccount:      unset (will run with the default ServiceAccount)
Status:              Error
Message:             failed to get token volumes: service account argo/default does not have any secrets

我不清楚为什么这不起作用,因为它直接来自Quickstart文档。我们将不胜感激。

您的默认服务帐户似乎缺少凭据(kubernetes secret(

您可以通过运行来检查凭据所需的凭据来验证凭据的存在kubectl get serviceaccount -n default default -o yaml

kubectl get serviceaccount -n default default -o yaml
apiVersion: v1
kind: ServiceAccount
metadata:
creationTimestamp: "2022-02-10T10:48:54Z"
name: default
namespace: default
resourceVersion: "*******"
uid: ********************
secrets:
- name: default-token-*****

现在你应该能够找到附在服务帐户上的秘密

kubectl get secret -n default default-token-***** -o yaml

或者你可以直接运行

kubectl get secret -n default

查看各自命名空间中的所有机密(在本例中为默认值(

Argo工作流还不能与Kubernetes v1.24+一起使用。请参阅此问题:

https://github.com/argoproj/argo-workflows/issues/8320

相关内容

  • 没有找到相关文章

最新更新