语法
[09:06:48 root@ceshi-01 ~ $]kubeadm completion --help
Output shell completion code for the specified shell (bash or zsh).
自动补全(bash or zsh)
The shell code must be evaluated to provide interactive completion of kubeadm commands.
必须评估shell代码以提供kubeadm命令的交互式完成。
This can be done by sourcing it from the .bash_profile.
这可以通过从.bash_profile获取来完成。
Note: this requires the bash-completion framework.
To install it on Mac use homebrew:
$ brew install bash-completion
Once installed, bash_completion must be evaluated. This can be done by adding the
following line to the .bash_profile
$ source $(brew --prefix)/etc/bash_completion
If bash-completion is not installed on Linux, please install the 'bash-completion' package
via your distribution's package manager.
Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2
Usage:
kubeadm completion SHELL [flags]
Examples:
# Install bash completion on a Mac using homebrew
brew install bash-completion
printf "\n# Bash completion support\nsource $(brew --prefix)/etc/bash_completion\n" >> $HOME/.bash_profile
source $HOME/.bash_profile
# Load the kubeadm completion code for bash into the current shell
source <(kubeadm completion bash)
# Write bash completion code to a file and source it from .bash_profile
kubeadm completion bash > ~/.kube/kubeadm_completion.bash.inc
printf "\n# Kubeadm shell completion\nsource '$HOME/.kube/kubeadm_completion.bash.inc'\n" >> $HOME/.bash_profile
source $HOME/.bash_profile
# Load the kubeadm completion code for zsh[1] into the current shell
source <(kubeadm completion zsh)
Flags:
-h, --help help for completion
Global Flags:
--log-file string If non-empty, use this log file.
如果非空,使用这里定义的日志文件
--log-file-max-size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
定义日志文件可以增长到的最大大小,单位是 MB,如果值为0,则不受限制(默认1800)
--rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem.
【实验】真正的主机文件系统的路径
--skip-headers If true, avoid header prefixes in the log messages
如果为true,请避免在日志消息中使用标头前缀
--skip-log-headers If true, avoid headers when opening log files
如果为true,请在打开日志文件时避免使用标头
-v, --v Level number for the log level verbosity
定义日志级别
网友评论