티스토리 뷰

Lens가 Login을 강제함에따라 대체제를 찾아보다가 K9S를 발견함

 

vim기반의 CLI로 K8S를 관리 할 수 있다

 

brew 나 github를 이용하여 설치

 

https://github.com/derailed/k9s

 

GitHub - derailed/k9s: 🐶 Kubernetes CLI To Manage Your Clusters In Style!

🐶 Kubernetes CLI To Manage Your Clusters In Style! - GitHub - derailed/k9s: 🐶 Kubernetes CLI To Manage Your Clusters In Style!

github.com

위는 pod화면이며 전화하려면 VI사용하는것처럼 : 타이핑 후 오브젝트 이름을 넣으면 됨(tap도 먹음)

 

 

 

 

 

:node

위와같이 타이핑하면 node 오브젝트가 나옴

기본적으로 yaml출력, edit 등 모든 관리가 가능하다

nodeshell의 경우 아래의 설정파일을 수정

 

Unix                             macOS                                                                             Windows

~/.config/k9s ~/Library/Application Support/k9s %LOCALAPPDATA%\k9s

위 위치내 config.yml

 

 

featureGates:
        nodeShell: true
      shellPod:
        image: busybox:1.31
        command: []
        args: []

nodeshell을 true로 설정

이후 node 관리창에보면 shell 매뉴가 활성화 되있음

host의 루트 볼륨이 /host에 마운트 되므로 chroot를 이용하여 /host를 루트로 변경해주면 노드쉘을 사용할수 있다

<<K9s-Shell>> Pod: default/k9s-shell-8886 | Container: k9s-shell
/ # chroot /host
[root@ip-10-110-11-117 /]#
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/10   »
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
글 보관함