Access Cluster: failed to grep on MacOS (#12200)
The related issue is here: https://github.com/kubernetes/website/issues/12199
This commit is contained in:
parent
b31c0039f9
commit
ab2918bf31
|
|
@ -80,7 +80,7 @@ Use `kubectl describe secret...` to get the token for the default service accoun
|
|||
|
||||
```shell
|
||||
$ APISERVER=$(kubectl config view --minify | grep server | cut -f 2- -d ":" | tr -d " ")
|
||||
$ TOKEN=$(kubectl describe secret $(kubectl get secrets | grep ^default | cut -f1 -d ' ') | grep -E '^token' | cut -f2 -d':' | tr -d " ")
|
||||
$ TOKEN=$(kubectl describe secret $(kubectl get secrets | grep "^default" | cut -f1 -d ' ') | grep -E '^token' | cut -f2 -d':' | tr -d " ")
|
||||
$ curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure
|
||||
{
|
||||
"kind": "APIVersions",
|
||||
|
|
|
|||
Loading…
Reference in New Issue