From 3ad58322dde9d00c1cb4190e1098d26ebd1c43da Mon Sep 17 00:00:00 2001 From: JanetKuo Date: Thu, 10 Sep 2015 12:09:38 -0700 Subject: [PATCH] Document how to install kubectl bash completion --- docs/getting-started-guides/gce.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/getting-started-guides/gce.md b/docs/getting-started-guides/gce.md index 8353ac90299..22663d42e3b 100644 --- a/docs/getting-started-guides/gce.md +++ b/docs/getting-started-guides/gce.md @@ -132,6 +132,24 @@ However the gcloud bundled kubectl version may be older than the one downloaded get.k8s.io install script. We recommend you use the downloaded binary to avoid potential issues with client/server version skew. +#### Enabling bash completion of the Kubernetes command line tools + +You may find it useful to enable `kubectl` bash completion: + +``` +$ source ./contrib/completions/bash/kubectl +``` + +**Note**: This will last for the duration of your bash session. If you want to make this permanent you need to add this line in your bash profile. + +Alternatively, on most linux distributions you can also move the completions file to your bash_completions.d like this: + +``` +$ cp ./contrib/completions/bash/kubectl /etc/bash_completion.d/ +``` + +but then you have to update it when you update kubectl. + ### Getting started with your cluster #### Inspect your cluster