Azure / Azure/kubectl-aks

Allow setting a default subscription as `az` does

Open
#56 0 comments 0 reactions 0 assignees View on GitHub
config good first issue
Dominant language
Go
Stars
39
Forks
15
PR merge metrics
No merged PRs in 30d

Description

## 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:

```bash
az account set --subscription
```

```bash
kubectl aks config set-subscription
```

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`?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the existing config import command, current --subscription flag handling, and command entry points for config and set. Determine how configuration is persisted, then define the set-subscription or set form and unset behavior. Done means imported subscriptions are saved, an explicit --subscription takes precedence, and the chosen set/unset commands behave consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go, kubernetes
Domain
cli, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.