語法
[09:06:48 root@ceshi-01 ~ $]kubeadm completion --help
Output shell completion code for the specified shell (bash or zsh).
自動補(bǔ)全(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,則不受限制(默認(rèn)1800)
--rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem.
【實(shí)驗(yàn)】真正的主機(jī)文件系統(tǒng)的路徑
--skip-headers If true, avoid header prefixes in the log messages
如果為true,請避免在日志消息中使用標(biāo)頭前綴
--skip-log-headers If true, avoid headers when opening log files
如果為true寒匙,請?jiān)诖蜷_日志文件時(shí)避免使用標(biāo)頭
-v, --v Level number for the log level verbosity
定義日志級別