Difference between revisions of "Access Kubernetes REST API using default token"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
 
  TOKEN=$([[kubectl describe secret default-token]] | grep -E '^token' | cut -f2 -d':' | tr -d " ")
 
  TOKEN=$([[kubectl describe secret default-token]] | grep -E '^token' | cut -f2 -d':' | tr -d " ")
 
   
 
   
  curl $APISERVER/api [[--header]] "[[Authorization: Bearer]] $TOKEN" --insecure
+
  curl $APISERVER[[/api]] [[--header]] "[[Authorization: Bearer]] $TOKEN" --insecure
 
  Ref: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/
 
  Ref: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/
  

Revision as of 10:32, 10 October 2023

Advertising: