Created
May 11, 2023 08:46
-
-
Save niusmallnan/6f10849a22eafb536a7e3b9dfe9fdb17 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
NS=test | |
NUM=2000 | |
n=1 | |
while [ $n -le $NUM ]; do | |
kubectl create serviceaccount test$n -n $NS | |
kubectl create -f - <<EOF | |
apiVersion: v1 | |
kind: Secret | |
type: kubernetes.io/service-account-token | |
metadata: | |
name: test$n | |
namespace: test | |
annotations: | |
kubernetes.io/service-account.name: test$n | |
EOF | |
let n++ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment