«   2025/03   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
Recent Posts
Today
Total
03-13 05:26
300x250
관리 메뉴

변군이글루 블로그(Development)

kubectl 명령어의 자동 완성을 활성화하는 방법 본문

리눅스

kubectl 명령어의 자동 완성을 활성화하는 방법

변군Dev 2024. 2. 7. 14:45
728x90

kubectl 명령어의 자동 완성을 활성화하는 방법

kubectl 자동 완성 스크립트를 다운로드

echo 'source <(kubectl completion bash)' >>~/.bashrc

영구적으로 적용하려면 .bashrc 파일 또는 해당 사용자의 셸 설정 파일에 이 스크립트를 추가

source ~/.bashrc

kubectl [Tab][Tab]

$ kubectl 
annotate       (Update the annotations on a resource)
api-resources  (Print the supported API resources on the server)
api-versions   (Print the supported API versions on the server, in the form of "group/version")
apply          (Apply a configuration to a resource by file name or stdin)
attach         (Attach to a running container)
...
top            (Display resource (CPU/memory) usage)
uncordon       (Mark node as schedulable)
version        (Print the client and server version information)
wait           (Experimental: Wait for a specific condition on one or many resources)

 

참고URL

- Kubernetes Documentation : Install and Set Up kubectl on Linux

 

728x90