Add script to get admin token

This commit is contained in:
Jonas Juselius
2020-11-10 10:56:48 +01:00
parent 8d744d3615
commit fc7e49ad1b

5
scripts/get-admin-token.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
token=$(kubectl get secret -n kube-system | grep cluster-admin-token | cut -d' ' -f1)
kubectl get secret -n kube-system $token -o yaml | \
grep ' token:' | cut -d' ' -f4 | base64 -d