Created
April 14, 2021 09:17
-
-
Save lixianyang/f2b0a5c8f04030a858a2101953098e43 to your computer and use it in GitHub Desktop.
create root token for kubernetes apiserver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
admin_account="k8s-cyk-admin" | |
kubectl create serviceaccount ${admin_account} -n kube-system | |
kubectl create clusterrolebinding ${admin_account} --clusterrole=cluster-admin --serviceaccount=kube-system:${admin_account} | |
kubectl -n kube-system describe secrets $(kubectl -n kube-system get secret | grep ${admin_account} | awk '{print $1}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment