【发布时间】:2021-12-02 09:20:50
【问题描述】:
我有以下问题。我尝试使用带有 Gitlab CI/CD 的 Terraform 连接到 eks 集群,我收到错误消息,但是在我的计算中尝试它时,不会出现此错误,有人有同样的错误吗?
$ terraform output authconfig > authconfig.yaml
$ cat authconfig.yaml
<<EOT
apiVersion: v1
kind: ConfigMap
metadata:
name: aws-auth
namespace: kube-system
data:
mapRoles: |
- rolearn: "arn:aws:iam::503655390180:role/clusters-production-workers"
username: system:node:{{EC2PrivateDNSName}}
groups:
- system:bootstrappers
- system:nodes
EOT
$ kubectl create -f authconfig.yaml -n kube-system
error: error parsing authconfig.yaml: error converting YAML to JSON: yaml: line 2: mapping values are not allowed in this context
【问题讨论】:
标签: kubernetes terraform gitlab-ci amazon-eks