kubectl-aks
kubectl-aks copied to clipboard
Allow setting a default subscription as `az` does
Current situation
We must specify every time the subscription ID. Given that usually users work in one single subscription, let's allow to set it once and forever.
Ideal situation
Analogous to az, allow setting a default subscription:
az account set --subscription <mySubscriptionID>
kubectl aks config set-subscription <mySubscriptionID>
It doesn't make sense to have a use-subscription flag because we can't set more than one subscription.
Implementation details
- The
config importcommand should also import and set the subscription in the config file. - If users use the
--subscriptionflag, it should have precedence over the one in the config file. - Should we add another command
set-subscriptionor make it a sub-command ofsetso that we have:set --nodeandset --subscription? - Should we have
unset all,unset nodes [node1,node2,...,nodeX]>(optionally, user can unset one or mode nodes) andunset subscription?