【问题标题】:Why openshift creates two secrets when I create a serviceaccount为什么 openshift 在我创建服务帐户时会创建两个秘密
【发布时间】:2021-10-14 16:52:40
【问题描述】:

我在 openshift 上创建了一个具有edit 权限的服务帐户:

oc create serviceaccount gitlab-ci
oc policy add-role-to-user edit system:serviceaccount:test-project:gitlab-ci

但是当我检查秘密时,我看到关于服务帐户的两个秘密,两者具有相同的结构但具有不同的值:

两个secret有什么用,为什么不能通过一个secret处理?

【问题讨论】:

    标签: openshift-3 k8s-serviceaccount


    【解决方案1】:

    分析器在文档中:Understanding and creating service accounts:

    每个服务帐户自动包含两个秘密:

    • API 令牌
    • OpenShift Container Registry 的凭据

    【讨论】:

    • Credentials for the OpenShift Container Registry 不同,它的名称类似于 gitlab-ci-dockercfg-aaa,与 gitlab-ci-token-XXX 不同
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-12-13
    • 2019-03-30
    • 2021-03-19
    • 2021-11-24
    • 1970-01-01
    • 2022-01-23
    • 2019-05-06
    相关资源
    最近更新 更多