kubernetes - 使用 helm 从 github-actions 部署到 GKE 的权限错误“container.secrets.list”
问题描述
我正在尝试使用我的 github 操作运行程序中的 helm 部署到我的 GKE 集群,但我遇到了权限错误。
使用谷歌云服务帐号进行身份验证
GitHub Actions CI 步骤
- name: Install gcloud cli
uses: google-github-actions/setup-gcloud@master
with:
version: latest
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
service_account_email: ${{ secrets.GCLOUD_SA_EMAIL }}
service_account_key: ${{ secrets.GCLOUD_SA_KEY }}
export_default_credentials: true
- name: gcloud configure
run: |
gcloud config set project ${{secrets.GCLOUD_PROJECT_ID}};
gcloud config set compute/zone ${{secrets.GCLOUD_COMPUTE_ZONE}};
gcloud container clusters get-credentials ${{secrets.GCLOUD_CLUSTER_NAME}};
- name: Deploy
run: |
***
helm upgrade *** ./helm \
--install \
--debug \
--reuse-values \
--set-string "$overrides"
错误
history.go:56: [debug] getting history for release blog
Error: query: failed to query with labels: secrets is forbidden: User "***" cannot list resource "secrets" in API group "" in the namespace "default": requires one of ["container.secrets.list"] permission(s).
helm.go:88: [debug] secrets is forbidden: User "***" cannot list resource "secrets" in API group "" in the namespace "default": requires one of ["container.secrets.list"] permission(s).
解决方案
推荐阅读
- sql - MS Access - 删除运行总计(子查询输出)< 100 的记录
- python - 绑定事件后,Tkinter 如何处理 lambda?
- python - Kivy 绘制的项目“消失”(或可能的渲染顺序问题)
- angular - 通过注释值创建角度分量?
- javascript - 如何在 HTML 中为电影评论网站创建投票系统?
- php - PHP 连接和查询错误:致命错误:在 null 上调用成员函数 query()
- sql - 计算每种奖励类型的平均值
- javascript - 如何检测数组是否包含任何特定长度的值
- date - 仅返回日期超过 7 天的行
- c++ - 问题比较答案键的字符串 (C++)