Yashar
Yashar

Reputation: 2723

Why openshift creates two secrets when I create a serviceaccount

I have created a serviceaccount with edit permission on openshift:

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

but when I check the secrets, I see two secrets regarding the serviceaccount, both have the same structure but with a different values:

enter image description here

What are the uses of two secrets and why can't we handle it via one secret?

Upvotes: 3

Views: 1073

Answers (1)

titou10
titou10

Reputation: 2977

The anser is in the documentation: Understanding and creating service accounts:

Each service account automatically contains two secrets:

  • An API token
  • Credentials for the OpenShift Container Registry

Upvotes: 0

Related Questions