kubectl-aks icon indicating copy to clipboard operation
kubectl-aks copied to clipboard

Allow setting a default subscription as `az` does

Open blanquicet opened this issue 1 year ago • 0 comments

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 import command should also import and set the subscription in the config file.
  • If users use the --subscription flag, it should have precedence over the one in the config file.
  • Should we add another command set-subscription or make it a sub-command of set so that we have: set --node and set --subscription?
  • Should we have unset all, unset nodes [node1,node2,...,nodeX]> (optionally, user can unset one or mode nodes) and unset subscription?

blanquicet avatar Feb 05 '24 22:02 blanquicet