Bug 1684546

Summary: error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: Unauthorized
Product: OpenShift Container Platform Reporter: Oscar Casal Sanchez <ocasalsa>
Component: MonitoringAssignee: Frederic Branczyk <fbranczy>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: aos-bugs, erooth, mkhan, mloibl, sponnaga, surbania
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:44:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1664187    

Comment 1 Mo 2019-03-01 14:47:57 UTC
The error is referring to something being broken in between metrics and the kube api server.  kube:admin has full cluster admin rights always.

Comment 5 Junqi Zhao 2019-03-04 01:23:25 UTC
I think the payload is too old, we had this issue before(see https://bugzilla.redhat.com/show_bug.cgi?id=1674372#c4), but now it is fixed
Can you check
$ oc get clusterversion



my env:
$ oc whoami
kube:admin

$ oc api-resources
NAME                                  SHORTNAMES       APIGROUP                                NAMESPACED   KIND
bindings                                                                                       true         Binding
componentstatuses                     cs                                                       false        ComponentStatus
configmaps                            cm                                                       true         ConfigMap
endpoints                             ep                                                       true         Endpoints
events                                ev                                                       true         Event
limitranges                           limits                                                   true         LimitRange
namespaces                            ns                                                       false        Namespace
nodes                                 no                                                       false        Node
persistentvolumeclaims                pvc                                                      true         PersistentVolumeClaim
...........................................................

$ oc whoami
kube:admin

Comment 13 Junqi Zhao 2019-03-29 09:01:02 UTC
Could get correct api-resources via
# oc api-resources

payload: 4.0.0-0.nightly-2019-03-28-030453

Comment 14 Oscar Casal Sanchez 2019-03-29 17:01:39 UTC
Hello,

I have deployed again and the result is satisfactory:

$ oc version
oc v4.0.0-0.139.0
kubernetes v1.11.0+c69f926354
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://api.ocasalsa4015.rhcee.support:6443
kubernetes v1.12.4+8156b0c

$ oc api-resources 
NAME                                  SHORTNAMES       APIGROUP                              NAMESPACED   KIND
bindings                                                                                     true         Binding
componentstatuses                     cs                                                     false        ComponentStatus
configmaps                            cm                                                     true         ConfigMap
endpoints                             ep                                                     true         Endpoints
events                                ev                                                     true         Event
limitranges                           limits                                                 true         LimitRange
namespaces                            ns                                                     false        Namespace
nodes                                 no                                                     false        Node
persistentvolumeclaims                pvc                                                    true         PersistentVolumeClaim
persistentvolumes                     pv                                                     false        PersistentVolume
pods                                  po                                                     true         Pod
podtemplates                                                                                 true         PodTemplate
replicationcontrollers                rc                                                     true         ReplicationController
resourcequotas                        quota                                                  true         ResourceQuota
secrets                                                                                      true         Secret

Comment 16 errata-xmlrpc 2019-06-04 10:44:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0758