Getting "You must be logged in to the server (the server has asked for the client to provide credentials)" error message on a Single Node OpenShift after certificates expire

Solution Verified - Updated -

Issue

  • After having an SNO turned off for more than 90 days and turning it back on, the self-signed certificates are all expired.
  • When trying to renew the certificates following the steps of the knowledge article 5953441, the following error message is shown:

    # export KUBECONFIG=/etc/kubernetes/static-pod-resources/kube-apiserver-certs/secrets/node-kubeconfigs/lb-int.kubeconfig
    # oc get csr -o name | xargs oc adm certificate approve
    [...]
    error: You must be logged in to the server (the server has asked for the client to provide credentials)
    

Environment

  • Red Hat OpenShift Container Platform (OCP)
    • Single Node OpenShift (SNO)
      • 4.16
      • 4.17

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