© The Author(s), under exclusive license to APress Media, LLC , part of Springer Nature 2021
P. MartinKuberneteshttps://doi.org/10.1007/978-1-4842-6494-2_16

16. Command-Line Tools

Philippe Martin1  
(1)
Gif-sur-Yvette, France
 

kubectl

kubectl is the command-line tool used to work on Kubernetes clusters. You can use it to create application resources and cluster resources, interact with running containers, and manage the cluster.

kubectl completion
  • This command outputs the shell code to execute to make the auto-completion work with the kubectl command. Its simplest usage is to “source” its output that will make auto-completion available for the current shell session:

$ source <(kubectl completion bash)
  • or, if using the zsh shell:

$ source <(kubectl completion ...

Get Kubernetes: Preparing for the CKA and CKAD Certifications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.