Why does OpenShift Container Platform 4 create two secret of type kubernetes.io/service-account-token for each serviceAccount created

Solution Verified - Updated -

Issue

  • If we create a service account, two service account tokens are generated, correct?
    • Why are there two tokens generated?
    • Are both valid?
    • Which of the two tokens do I get with oc serviceaccounts get-token <serviceAccount>
  • Why does OpenShift Container Platform 4 create two secret of type kubernetes.io/service-account-token for each serviceAccount created?

Environment

  • Red Hat OpenShift Container Plaatform (RHOCP) 4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content