Difference between revisions of "Access Kubernetes REST API using default token"
Jump to navigation
Jump to search
(Created page with " APISERVER=$(kubectl config view --minify | grep server | cut -f 2- -d ":" | tr -d " ") TOKEN=$(kubectl describe secret default-token | grep -E '^token' | cut -f2 -d'...") |
|||
Line 5: | Line 5: | ||
Ref: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/ | Ref: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/ | ||
+ | == Related == | ||
+ | * [[Kubernetes bearer tokens]] | ||
− | + | == See also == | |
− | {{K8s API}} | + | * {{K8s API}} |
Revision as of 10:30, 10 October 2023
APISERVER=$(kubectl config view --minify | grep server | cut -f 2- -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 Ref: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/
Related
See also
Advertising: