반응형
🔹 환경 정보
OS: RHEL8
🔹 로그 내용
k9s 설치 후 실행 시 에러 출력
k9s version은 잘 되는데 k9s 명령어는 안되는 상황
k9s
Error: character set not supported
Usage:
k9s [flags]
k9s [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
info List K9s configurations info
version Print version/build info
Flags:
-A, --all-namespaces Launch K9s in all namespaces
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
-c, --command string Overrides the default resource to load when the application launches
--context string The name of the kubeconfig context to use
--crumbsless Turn K9s crumbs off
--headless Turn K9s header off
-h, --help help for k9s
--insecure-skip-tls-verify If true, the server's caCertFile will not be checked for validity
--kubeconfig string Path to the kubeconfig file to use for CLI requests
--logFile string Specify the log file (default "/root/.local/state/k9s/k9s.log")
-l, --logLevel string Specify a log level (error, warn, info, debug, trace) (default "info")
--logoless Turn K9s logo off
-n, --namespace string If present, the namespace scope for this CLI request
--readonly Sets readOnly mode by overriding readOnly configuration setting
-r, --refresh int Specify the default refresh rate as an integer (sec) (default 2)
--request-timeout string The length of time to wait before giving up on a single server request
--screen-dump-dir string Sets a path to a dir for a screen dumps
--token string Bearer token for authentication to the API server
--user string The name of the kubeconfig user to use
--write Sets write mode by overriding the readOnly configuration setting
Use "k9s [command] --help" for more information about a command.
panic: character set not supported
goroutine 1 [running]:
github.com/derailed/k9s/cmd.Execute()
github.com/derailed/k9s/cmd/root.go:72 +0x77
main.main()
github.com/derailed/k9s/main.go:32 +0xf
위 로그에서 주요 에러는 Error: character set not supported, panic: character set not supported 이다.
🔹 문제 원인
서버 locale 설정을 살펴보면 k9s에서 사용하는 문자를 지원하지 않는 UCKR(ko_KR.euckr)설정이었다.
locale이란?
시스템이나 애플리케이션에서 사용하는 언어, 국가, 문자 인코딩 등의 지역적 설정을 정의하는 환경 변수이다.
간략히 추가 설명하자면 UCKR은 한국어 전용 인코딩이고, UTF-8은 모든 언어를 지원하는 범용 인코딩이다.
(예시) ko_KR.UTF-8: 한국어, 대한민국, UTF-8
🔹 문제 해결
# locale 목록 확인
locale -a
# utf8로 변경
vi /etc/locale.conf
---
(변경전) LANG=ko_KR.euckr
(변경후) LANG=ko_KR.utf8
---
# 단, locale -a에서 ko_KR.utf8이 없을 경우 ko_KR.utf8 생성하는 작업 별도로 필요함.
# 터미널 나갔다가 세션 다시 연결
반응형
'Kubernetes' 카테고리의 다른 글
[prometheus&grafana] Memory limit이 설정보다 2배로 보여요 (0) | 2025.02.27 |
---|---|
Kubernetes 관리 툴 K9S 설치 방법 및 사용 방법 (0) | 2025.02.17 |
[k8s] NodeSelector, PodNodeSelector, NodeLabel (0) | 2025.02.14 |
Onpremise에 Kubeflow 구축하기 (0) | 2024.12.03 |
kubeadm으로 Kubernetes 구축하기 on AWS EC2 (Containerd, Calico, RHEL8/RHEL9) (1) | 2024.11.23 |