Login failed (401 Unauthorized) in RHOCP4

Solution Verified - Updated -

Issue

  • Error when trying to login to openshift cluster from GUI and from CLI.
  • Getting error Login failed (401 Unauthorized) when trying to login from CLI.
  • openshift-kube-apiserver cluster operator is degraded in the cluster.
  • Pods in openshift-kube-apiserver project are stuck in ContainerCreating state.
  • Below events in openshift-kube-apiserver project :
Events:
Type     Reason                  Age    From     Message
----     ------                  ----   ----     -------
Warning  FailedCreatePodSandBox  5m16s  kubelet  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox k8s_installer-xx_openshift-kube-apiserver_xxx: error adding pod openshift-kube-apiser
Warning  FailedCreatePodSandBox  49s  kubelet  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox k8s_installer-xx_openshift-kube-apiserver_xxx: error adding pod openshift-kube-apiserver_installer-xx to CNI network "multus-cni-network": plugin type="multus" name="multus-cni
  • Below error in describe pod controller-manager-xx openshift-controller-manager project :
Events:
  Type     Reason                  Age                  From     Message
  ----     ------                  ----                 ----     -------
  Warning  FailedCreatePodSandBox  61s (x5765 over 8d)  kubelet  (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox k8s_controller-manager-xx_openshift-controller-manager_xx): error adding pod openshift-controller-manager_controller-manager-xx to CNI network "multus-cni-network": plugin type="multus" name="multus-cni-network" failed (add): [openshift-controller-manager/controller-manager-xx:ovn-kubernetes]: error adding container to network "ovn-kubernetes": CNI request failed with status 400: '[openshift-controller-manager/controller-manager-xx] [openshift-controller-manager/controller-manager-xx] failed to get pod annotation: timed out waiting for annotations: context deadline exceeded

Environment

  • Red Hat OpenShift Container Platform (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