Metric server API shows error "You must be logged in to the server (Unauthorized)" for oc adm top command in OpenShift Container Platform 3.
Issue
oc adm top
command throws an unauthorized message:
# oc adm top node
error: You must be logged in to the server (Unauthorized)
- Unable to get the metrics API :
# oc api-resources
error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: Unauthorized
# oc get --raw /apis/metrics.k8s.io/v1beta1
error: You must be logged in to the server (Unauthorized)
- HPA is not working
Environment
- OpenShift Container Platform
- 3.11
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.