Although we can interact with the Kubernetes API by sending raw HTTP requests using a program like curl, Kubernetes provides a convenient command-line client called kubectl. Let's install it:
$ curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.10.3/bin/linux/amd64/kubectl && chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl
You can find alternate installation methods at kubernetes.io/docs/tasks/tools/install-kubectl/.
You can check that the installation was successful by running kubectl version:
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
Finally, the kubectl provides autocompletion; to activate it, simply run the following code:
$ echo "source <(kubectl completion bash)" >> ~/.bashrc