Page MenuHomePhabricator
Paste P10515

(An Untitled Masterwork)
ActivePublic

Authored by bd808 on Feb 25 2020, 3:38 PM.
Tags
None
Referenced Files
F31630511: raw.txt
Feb 25 2020, 3:38 PM
Subscribers
root@tools-k8s-control-1:~# wmcs-k8s-enable-cluster-monitor toolschecker
NAME STATUS AGE
tool-toolschecker Active 70d
Creating the service account...
serviceaccount/toolschecker-obs created
Enabling read-only access to the cluster...
clusterrolebinding.rbac.authorization.k8s.io/toolschecker-obs created
rolebinding.rbac.authorization.k8s.io/toolschecker-obs-psp created
NAME SECRETS AGE
toolschecker-obs 1 0s
*********************
Done!

Event Timeline

kubectl --namespace tool-toolschecker get secrets -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='toolschecker-obs')].data.token}"

curl --header "Authorization: Bearer $TOKEN" --insecure https://k8s.tools.eqiad1.wikimedia.cloud:6443/api/v1/nodes
{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {
    
  },
  "status": "Failure",
  "message": "Unauthorized",
  "reason": "Unauthorized",
  "code": 401
}