Skip to content

Commit

Permalink
add karmadactl init --init-config & KarmadaInitConfig v1alpha1 documents
Browse files Browse the repository at this point in the history
Signed-off-by: tiansuo114 <1729765480@qq.com>
  • Loading branch information
tiansuo114 committed Oct 23, 2024
1 parent 58795b9 commit 671eca8
Show file tree
Hide file tree
Showing 47 changed files with 661 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ karmadactl [flags]
* [karmadactl api-versions](karmadactl_api-versions.md) - Print the supported API versions on the server, in the form of "group/version"
* [karmadactl apply](karmadactl_apply.md) - Apply a configuration to a resource by file name or stdin and propagate them into member clusters
* [karmadactl attach](karmadactl_attach.md) - Attach to a running container
* [karmadactl completion](karmadactl_completion.md) - Output shell completion code for the specified shell (bash, zsh)
* [karmadactl cordon](karmadactl_cordon.md) - Mark cluster as unschedulable
* [karmadactl create](karmadactl_create.md) - Create a resource from a file or from stdin
* [karmadactl deinit](karmadactl_deinit.md) - Remove the Karmada control plane from the Kubernetes cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ karmadactl annotate [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_
--field-selector string Selector (field query) to filter on, supports '=', '==', and '!='.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.
-f, --filename strings Filename, directory, or URL to files identifying the resource to update the annotation
-h, --help help for annotate
--karmada-context string The name of the kubeconfig context to use
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
-k, --kustomize string Process the kustomization directory. This flag can't be used together with -f or -R.
--list If true, display the annotations for a given resource.
--local If true, annotation will NOT contact api-server but run locally.
-n, --namespace string If present, the namespace scope for this CLI request.
-o, --output string Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).
--overwrite If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.
-R, --recursive Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
Expand All @@ -70,7 +73,6 @@ karmadactl annotate [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_
```
--add-dir-header If true, adds the file directory to the header of the log messages
--alsologtostderr log to standard error as well as files (no effect when -logtostderr=true)
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory (no effect when -logtostderr=true)
--log-file string If non-empty, use this log file (no effect when -logtostderr=true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ karmadactl api-resources [flags]
--categories strings Limit to resources that belong to the specified categories.
--cluster string Used to specify a target member cluster and only takes effect when the command's operation scope is members, for example: --operation-scope=members --cluster=member1
-h, --help help for api-resources
--karmada-context string The name of the kubeconfig context to use
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
--namespaced If false, non-namespaced resources will be returned, otherwise returning namespaced resources by default. (default true)
--no-headers When using the default or custom-column output format, don't print headers (default print headers).
--operation-scope operationScope Used to control the operation scope of the command. The optional values are karmada and members. Defaults to karmada. (default karmada)
-s, --operation-scope operationScope Used to control the operation scope of the command. The optional values are karmada and members. Defaults to karmada. (default karmada)
-o, --output string Output format. One of: (wide, name).
--sort-by string If non-empty, sort list of resources using specified field. The field can be either 'name' or 'kind'.
--verbs strings Limit to resources that support the specified verbs.
Expand All @@ -55,7 +57,6 @@ karmadactl api-resources [flags]
```
--add-dir-header If true, adds the file directory to the header of the log messages
--alsologtostderr log to standard error as well as files (no effect when -logtostderr=true)
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory (no effect when -logtostderr=true)
--log-file string If non-empty, use this log file (no effect when -logtostderr=true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ karmadactl api-versions
```
--cluster string Used to specify a target member cluster and only takes effect when the command's operation scope is members, for example: --operation-scope=members --cluster=member1
-h, --help help for api-versions
--operation-scope operationScope Used to control the operation scope of the command. The optional values are karmada and members. Defaults to karmada. (default karmada)
--karmada-context string The name of the kubeconfig context to use
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
-s, --operation-scope operationScope Used to control the operation scope of the command. The optional values are karmada and members. Defaults to karmada. (default karmada)
```

### Options inherited from parent commands

```
--add-dir-header If true, adds the file directory to the header of the log messages
--alsologtostderr log to standard error as well as files (no effect when -logtostderr=true)
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory (no effect when -logtostderr=true)
--log-file string If non-empty, use this log file (no effect when -logtostderr=true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ karmadactl apply (-f FILENAME | -k DIRECTORY)
--karmada-context string The name of the kubeconfig context to use
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
-k, --kustomize string Process a kustomization directory. This flag can't be used together with -f or -R.
-n, --namespace string If present, the namespace scope for this CLI request
-n, --namespace string If present, the namespace scope for this CLI request.
--openapi-patch If true, use openapi to calculate diff when the openapi presents and the resource can be found in the openapi spec. Otherwise, fall back to use baked-in types. (default true)
-o, --output string Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).
--overwrite Automatically resolve conflicts between the modified and live configuration by using values from the modified configuration (default true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ karmadactl attach (POD | TYPE/NAME) -c CONTAINER
-h, --help help for attach
--karmada-context string The name of the kubeconfig context to use
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
-n, --namespace string If present, the namespace scope for this CLI request
--operation-scope operationScope Used to control the operation scope of the command. The optional values are karmada and members. Defaults to karmada. (default karmada)
-n, --namespace string If present, the namespace scope for this CLI request.
-s, --operation-scope operationScope Used to control the operation scope of the command. The optional values are karmada and members. Defaults to karmada. (default karmada)
--pod-running-timeout duration The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running (default 1m0s)
-q, --quiet Only print output from the remote session
-i, --stdin Pass stdin to the container
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: karmadactl completion
---

Output shell completion code for the specified shell (bash, zsh)

### Synopsis

Output shell completion code for the specified shell (bash, zsh). The shell code must be evaluated to provide interactive completion of kubectl commands. This can be done by sourcing it from the .bash_profile.

Note for zsh users: zsh completions are only supported in versions of zsh >= 5.2.

```
karmadactl completion SHELL
```

### Examples

```
# Installing bash completion on Linux
## If bash-completion is not installed on Linux, install the 'bash-completion' package
1. apt-get install bash-completion
2. source /usr/share/bash-completion/bash_completion
## Load the karmadactl completion code for bash into the current shell
source <(karmadactl completion bash)
## Or, write bash completion code to a file and source it from .bash_profile
1. karmadactl completion bash > ~/.kube/completion.bash.inc
2. echo "source '$HOME/.kube/completion.bash.inc'" >> $HOME/.bash_profile
3. source $HOME/.bash_profile
# Load the karmadactl completion code for zsh into the current shell
source <(karmadactl completion zsh)
# Set the karmadactl completion code for zsh to autoload on startup
karmadactl completion zsh > "${fpath[1]}/karmadactl"
```

### Options

```
-h, --help help for completion
```

### Options inherited from parent commands

```
--add-dir-header If true, adds the file directory to the header of the log messages
--alsologtostderr log to standard error as well as files (no effect when -logtostderr=true)
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory (no effect when -logtostderr=true)
--log-file string If non-empty, use this log file (no effect when -logtostderr=true)
--log-file-max-size uint Defines the maximum size a log file can grow to (no effect when -logtostderr=true). Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
--logtostderr log to standard error instead of files (default true)
--one-output If true, only write logs to their native severity level (vs also writing to each lower severity level; no effect when -logtostderr=true)
--skip-headers If true, avoid header prefixes in the log messages
--skip-log-headers If true, avoid headers when opening log files (no effect when -logtostderr=true)
--stderrthreshold severity logs at or above this threshold go to stderr when writing to files and stderr (no effect when -logtostderr=true or -alsologtostderr=true) (default 2)
-v, --v Level number for the log level verbosity
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```

### SEE ALSO

* [karmadactl](karmadactl.md) - karmadactl controls a Kubernetes Cluster Federation.

#### Go Back to [Karmadactl Commands](karmadactl_index.md) Homepage.


###### Auto generated by [spf13/cobra script in Karmada](https://github.com/karmada-io/karmada/tree/master/hack/tools/genkarmadactldocs).
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ karmadactl create -f FILENAME
--field-manager string Name of the manager used to track field ownership. (default "kubectl-create")
-f, --filename strings Filename, directory, or URL to files to use to create the resource
-h, --help help for create
--karmada-context string The name of the kubeconfig context to use
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
-k, --kustomize string Process the kustomization directory. This flag can't be used together with -f or -R.
-n, --namespace string If present, the namespace scope for this CLI request.
-o, --output string Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).
--raw string Raw URI to POST to the server. Uses the transport specified by the kubeconfig file.
-R, --recursive Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
Expand All @@ -48,15 +51,14 @@ karmadactl create -f FILENAME
"true" or "strict" will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not.
"warn" will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as "ignore" otherwise.
"false" or "ignore" will not perform any schema validation, silently dropping any unknown or duplicate fields. (default "strict")
--windows-line-endings Only relevant if --edit=true. Defaults to the line ending native to your platform.
--windows-line-endings Only relevant if --edit=true. Defaults to the line ending native to your platform. (default true)
```

### Options inherited from parent commands

```
--add-dir-header If true, adds the file directory to the header of the log messages
--alsologtostderr log to standard error as well as files (no effect when -logtostderr=true)
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory (no effect when -logtostderr=true)
--log-file string If non-empty, use this log file (no effect when -logtostderr=true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ karmadactl create clusterrole NAME --verb=verb --resource=resource.group [--reso
```
--add-dir-header If true, adds the file directory to the header of the log messages
--alsologtostderr log to standard error as well as files (no effect when -logtostderr=true)
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--karmada-context string The name of the kubeconfig context to use
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory (no effect when -logtostderr=true)
--log-file string If non-empty, use this log file (no effect when -logtostderr=true)
--log-file-max-size uint Defines the maximum size a log file can grow to (no effect when -logtostderr=true). Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
--logtostderr log to standard error instead of files (default true)
-n, --namespace string If present, the namespace scope for this CLI request.
--one-output If true, only write logs to their native severity level (vs also writing to each lower severity level; no effect when -logtostderr=true)
--skip-headers If true, avoid header prefixes in the log messages
--skip-log-headers If true, avoid headers when opening log files (no effect when -logtostderr=true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ karmadactl create clusterrolebinding NAME --clusterrole=NAME [--user=username] [
```
--add-dir-header If true, adds the file directory to the header of the log messages
--alsologtostderr log to standard error as well as files (no effect when -logtostderr=true)
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--karmada-context string The name of the kubeconfig context to use
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory (no effect when -logtostderr=true)
--log-file string If non-empty, use this log file (no effect when -logtostderr=true)
--log-file-max-size uint Defines the maximum size a log file can grow to (no effect when -logtostderr=true). Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
--logtostderr log to standard error instead of files (default true)
-n, --namespace string If present, the namespace scope for this CLI request.
--one-output If true, only write logs to their native severity level (vs also writing to each lower severity level; no effect when -logtostderr=true)
--skip-headers If true, avoid header prefixes in the log messages
--skip-log-headers If true, avoid headers when opening log files (no effect when -logtostderr=true)
Expand Down
Loading

0 comments on commit 671eca8

Please sign in to comment.