-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[KEP-3104] Kuberc beta #51351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev-1.34
Are you sure you want to change the base?
[KEP-3104] Kuberc beta #51351
Conversation
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
👷 Deploy Preview for kubernetes-io-vnext-staging processing.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
/lgtm |
LGTM label has been added. Git tree hash: e21e1f494afc538904a4497edafc7c914d93f0bb
|
@@ -89,7 +90,7 @@ operator to use or manage a cluster. | |||
* [kube-controller-manager configuration (v1alpha1)](/docs/reference/config-api/kube-controller-manager-config.v1alpha1/) | |||
* [kube-proxy configuration (v1alpha1)](/docs/reference/config-api/kube-proxy-config.v1alpha1/) | |||
* [`audit.k8s.io/v1` API](/docs/reference/config-api/apiserver-audit.v1/) | |||
* [Client authentication API (v1beta1)](/docs/reference/config-api/client-authentication.v1beta1/) and | |||
* [Client authentication API (v1beta1)](/docs/reference/config-api/client-authentication.v1beta1/) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Avoid changing this line
## Disable kuberc | ||
|
||
To temporarily disable the kuberc functionality, simply export the environment variable `KUBERC` with the value `off`: | ||
To temporarily disable the kuberc functionality, simply export the environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To temporarily disable the kuberc functionality, simply export the environment | |
To temporarily disable the kuberc functionality, set (and export) the environment |
## Disable kuberc | ||
|
||
To temporarily disable the kuberc functionality, simply export the environment variable `KUBERC` with the value `off`: | ||
To temporarily disable the kuberc functionality, simply export the environment | ||
variable `KUBERC` with the value `off`: | ||
|
||
```shell | ||
export KUBERC=off |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this assume that the path off
is invalid?
compiled-in default value. | ||
{{< /note >}} | ||
|
||
#### Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete this line?
|
||
Append arbitrary arguments to the end of the kubectl command. | ||
|
||
#### Example {#appendArgs-example} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a reference document, this should retain the terse style of the existing reference (with, of course, the appropriate factual updates).
Please amend it to align more with the existing approach.
|
||
Alias name must not collide with the built-in commands. | ||
Within a `kuberc` configuration, _aliases_ section allows you to define custom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Within a `kuberc` configuration, _aliases_ section allows you to define custom | |
Within a `kuberc` configuration, the _aliases_ section allows you to define custom |
|
||
## aliases | ||
Currently, this file allows you to define two types of user preferences: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, this file allows you to define two types of user preferences: | |
A kuberc using the v1beta1 format allows you to define two types of user preferences: |
|
||
### name | ||
## Aliases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Aliases | |
## aliases |
|
||
### command | ||
## Defaults |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Defaults | |
## defaults |
This includes support for subcommands like `create role`. | ||
1. `options` - Specify default values for options. If you explicitly specify an option | ||
when you run `kubectl`, the value you provide takes precedence over the default | ||
one defined in `kuberc`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete this line?
- command: delete | ||
flags: | ||
options: | ||
- name: interactive | ||
default: "true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optionally, use a comment to explain why the value is quoted.
|
||
#### Example | ||
This next example makes the interactive removal the default mode for invoking | ||
`kubectl delete` command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`kubectl delete` command: | |
`kubectl delete`: |
|
||
A Kubernetes `kuberc` configuration file allows you to define preferences for kubectl, such as default options and command aliases. | ||
Unlike the kubeconfig file, a `kuberc` configuration file does **not** contain cluster details, usernames or passwords. | ||
A Kubernetes `kuberc` configuration file allows you to define preferences for kubectl, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better: make kubectl a hyperlink or a glossary tooltip.
|
||
#### Example {#flags-example} | ||
This next example defines `kubectl getn` alias for `kubectl get` command, additionally | ||
setting output flag `--output=json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setting output flag `--output=json`. | |
specifying JSON output format: `--output=json`. |
If you explicitly specify a command line argument when you run kubectl, the value you provide takes precedence over the default one defined in kuberc. | ||
|
||
#### Example {#flags-example} | ||
This next example defines `kubectl getn` alias for `kubectl get` command, additionally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This next example defines `kubectl getn` alias for `kubectl get` command, additionally | |
This next example defines a `kubectl getn` alias for the `kubectl get` subcommand, additionally |
Description
Promote kuberc to beta
Issue
KEP: kubernetes/enhancements#3104
/assign @ardaguclu
for sig-cli review
The generated changes are coming from kubernetes-sigs/reference-docs#396