- Windows Powershell
# Powershell 5.x echo 'Set-Alias -Name k -Value kubectl' >> $PROFILE echo 'Register-ArgumentCompleter -CommandName k -ScriptBlock $__kubectlCompleterBlock' >> $PROFILE kubectl completion powershell >> $PROFILE # Reload the PowerShell profile . $PROFILE
- Linux
# Install bash-completion # > For Ubuntu Base sudo apt-get install bash-completion # > For RHEL Base yum install bash-completion # Add the completion script to your .bashrc file echo 'source <(kubectl completion bash)' >>~/.bashrc # Apply changes source ~/.bashrc
Sample
Reference
- Install and Set Up kubectl on Linux | Kubernetes
- Install and Set Up kubectl on macOS | Kubernetes
- Install and Set Up kubectl on Windows | Kubernetes
Discover more from naiwaen@DebuggingSoft
Subscribe to get the latest posts sent to your email.