I'm trying to automate creation of a few K8s resources using either helm or kustomize (the latter is preferred option). What I want to do is:
create a ServiceAccount
get value of its token, as you would do with
kubectl get secret <secret_name> -o jsonpath={.data.token}
use the value from step #3 to create another Secret
This can be done pretty easily with CLI, but I want to wrap it using one of the templating tools. Any suggestions?