일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- PERL
- 게임
- 포탈
- 카카오
- 요리
- 구글
- 맥북
- 유튜브
- 클리어
- 프렌즈런
- 설치
- Linux
- arduino
- Java
- 인그레스
- game
- 공략
- OSX
- Python
- 이마트트레이더스
- Mac
- IntelliJ
- 닌텐도스위치
- Ingress
- Installation
- 판교
- 맛집
- 아이폰
- Today
- 60
- Total
- 3,170,926
준호씨의 블로그
k8s - 터미널에 context, namespace 정보 띄우는 방법들 본문
터미널에 kubernetes의 context, namespace 정보를 띄워주는 방법들을 정리합니다. context, namespace를 다양하게 사용할 때 실수를 방지하는데 도움을 줍니다.
kube-ps1
https://github.com/jonmosco/kube-ps1
GitHub - jonmosco/kube-ps1: Kubernetes prompt info for bash and zsh
Kubernetes prompt info for bash and zsh. Contribute to jonmosco/kube-ps1 development by creating an account on GitHub.
github.com
2022.06.20 알게 되어 세팅해본 방식입니다. 기존 zsh-kubectl-prompt의 단점이었던 context/namespace정보가 별도 라인에 나옵니다. 복붙 후 제거하기 편리할 것 같습니다.
설치
$ brew update
$ brew install kube-ps1
~/.zshrc 수정. 아래 내용 추가
source /path/to/kube-ps1.sh
PROMPT='$(kube_ps1)'$PROMPT
zsh-kubectl-prompt
https://github.com/superbrothers/zsh-kubectl-prompt
GitHub - superbrothers/zsh-kubectl-prompt: Display information about the kubectl current context and namespace in zsh prompt.
Display information about the kubectl current context and namespace in zsh prompt. - GitHub - superbrothers/zsh-kubectl-prompt: Display information about the kubectl current context and namespace i...
github.com
개인적으로 대충 2020~2022년 정도에 사용했던 방식입니다.
프롬프트 오른쪽에 오른쪽 정렬로 나타납니다. 괜찮긴 하지만 텍스트를 복붙 할 때 제거하기가 좀 불편합니다. 그냥 유지한다고 쳐도 좀 붙여 넣는 곳 환경에 따라 예쁘게 붙여 넣기가 힘든 편입니다.
설치
$ brew tap superbrothers/zsh-kubectl-prompt
$ brew install zsh-kubectl-prompt
~/.zshrc 수정은 안내 참고
'개발이야기' 카테고리의 다른 글
k8s - 터미널에 context, namespace 정보 띄우는 방법들 (0) | 2022.06.20 |
---|---|
tomcat - 환경변수 세팅은 bin/setenv.sh 에서 (0) | 2022.03.24 |
IntelliJ에서 JUnit 테스트가 느릴때 속도개선 - 매번 Gradle 빌드하고 있다면 (0) | 2022.03.08 |
Java - 클린코드 10장 클래스에서 언급한 표준 자바 관례 (Standard Java Convention)의 작성 순서 확인 (0) | 2022.02.13 |
IntelliJ - build.gradle 설정이 No candidates found for method call plugins. 로 나오는 경우 (0) | 2021.12.29 |
정원사들 시즌7 시작. 출석부 세팅하기 - 서버 설정. httpd, mongodb... (0) | 2021.11.17 |