kubernetes / kubernetes/kubectl

Command default config rules for kubectl (perhaps in ~/.kube/config)

Open
#537 26 comments 5 reactions 2 assignees Claimed by @dougsland View on GitHub
area/kubectl kind/feature lifecycle/frozen priority/backlog sig/cli
Dominant language
Go
Stars
3.3k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

---

/kind feature
/sig cli

**Kubernetes version** (use `kubectl version`):
All

**Environment**:
- **Cloud provider or hardware configuration**: N/A
- **OS** (e.g. from /etc/os-release): N/A
- **Kernel** (e.g. `uname -a`): N/A
- **Install tools**: kubectl
- **Others**:

**What happened**:

We would like to have rules for kubectl that allow you to specify default configs for certain commands

For example:

`kubectl get pods`

The default for `--show-all` is `true`

**What you expected to happen**:

But what if want to run the same but with the default `--show-all=false` without specifying it like this:

`kubectl get pods --show-all=false`. I just want to run it like this

`kubectl get pods`

**How to reproduce it** (as minimally and precisely as possible):

`kubectl get pods --show-all=false`

**Anything else we need to know**:

It would be nice to have a generic structure in the config for all the default config options.

Some background [here](https://stackoverflow.com/questions/52488362/hide-completed-and-other-finished-pods-by-default)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.