How to create a long lived service account token in RHOCP4

Solution Verified - Updated -

Issue

  • How to create long-lived service account tokens for applications in RHOCP4?
  • How to create more secure service account tokens in RHOCP4?
  • How to create bound service account tokens in OpenShift.
  • Errors like the following one are shown in the openshift-kube-apiserver pods:

    "Unable to authenticate the request" err="[invalid bearer token, service account token has been invalidated, token lookup failed]"
    

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4.11 and above

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