Kubeadm: completion: add note that 'bash-completion' is required on Linux too

Created on 26 May 2018  路  6Comments  路  Source: kubernetes/kubeadm

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

kubeadm version (use kubeadm version):v1.9.3

Environment:

  • OS (e.g. from /etc/os-release): CentOS 7.4
  • Kernel (e.g. uname -a): Linux iZbp1h3apv3aahc08gsdbhZ 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Others:I am using bash

What happened?

After I run source <(kubeadm completion bash), I type kubeadm u and the type the tab. I get

kubeadm u-bash: _get_comp_words_by_ref: not found 

What you expected to happen?

Get

kubeadm upgrade
areUX documentatioimprovement help wanted

All 6 comments

I just finger out I did not install the bash-completion, we can close it.
But should we tell the users that they should check the installation of bash-completion, since we only mention the Mac in the help...

Note: this requires the bash-completion framework, which is not installed
by default on Mac. This can be installed by using homebrew:

I just finger out I did not install the bash-completion, we can close it.
But should we tell the users that they should check the installation of bash-completion, since we only mention the Mac in the help...

yes, definitely.

https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/cmd/completion.go#L55

should be changed to something like:

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.

please, feel free to /assign if you want to make the change.

/assign

@neolit123 I am very interested in kubeadm, I'd like to do some contribution. So feel free to ping me, if there is anything I can help(though I am a beginner of kubeadm). 馃槅

@xlgao-zju
sure, contributions are welcome!

@xlgao-zju here's the help-wanted issue query :+1:
Definitely feel free to /assign yourself to any open issues :)

Also, the development slack channel is kubernetes#sig-cluster-lifecycle, and we have office hours every wednesday. Feel welcome to join and ask questions. We'd love to help you become a better contributor.

Was this page helpful?
0 / 5 - 0 ratings