I am trying to download kubeconfig for all the downstream clusters as we do from the UI.
curl -s -k -X 'POST' \
-H "Authorization: Bearer $RANCHER_TOKEN" \
$RANCHER_URL/v3/clusters/$CLUSTER_ID?action=generateKubeconfig | jq -r ".config" > $CLUSTER_NAME.kubeconfig
This is looping over all the clusters id’s and getting the config, what’s the best way to get all clusters config as one single config file?