kubectl describe secret default-token

From wikieduonline
Jump to navigation Jump to search

kubectl describe secret default-token
kubectl describe secret default-token -n yournamespace


Error from server (NotFound): secrets "default-token" not found

K8s REST API

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/

Activities

Related

See also

Advertising: