Difference between revisions of "Access EKS API using a Bearer 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':' | tr...") |
|||
Line 3: | Line 3: | ||
You can use a default-token or generate one in EKS using: aws eks get-token | You can use a default-token or generate one in EKS using: aws eks get-token | ||
− | curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure [1] | + | curl $APISERVER/api --header "[[Authorization: Bearer]] $TOKEN" --insecure [1] |
{{EKS API}} | {{EKS API}} |
Revision as of 17:13, 24 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 " ") You can use a default-token or generate one in EKS using: aws eks get-token
curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure [1]
Advertising: