k9s配置文件
- DevOps
- 2022-08-04
- 11热度
- 0评论
k9s:
# 表示用户界面轮询间隔。默认2秒
refreshRate: 2
# 在与api-server的连接丢失后重试的次数。默认15。
maxConnRetry: 5
# 是否支持鼠标,默认不支持
enableMouse: false
# 设置为true隐藏K9s头部。默认false
headless: false
logoless: false
# 设置为true隐藏K9s碎片。默认false
crumbsless: false
# 指示是否禁用诸如delete/kill/edit等修改命令。默认false
readOnly: false
# 切换显示的图标,因为不是所有终端都支持这些字符。
noIcons: false
logger:
# 定义要返回的行数。默认100
tail: 100
# 定义视图中允许的日志行总数。默认1000
buffer: 5000
# 表示在日志时间轴中以秒为单位返回的距离。设置为-1将显示所有可用的日志。默认是5分钟。
sinceSeconds: 60
# 全屏显示日志。默认false
fullScreenLogs: false
# 日志换行。默认false
textWrap: false
# 日志行时间戳信息。默认false
showTime: false
# 指示当前Kube上下文。默认为当前上下文
currentContext: "sit"
# 当前kube集群。默认为当前上下文集群
currentCluster: "sit-cluster"
clusters:
"sit-cluster":
namespace:
active: default
favorites:
- default
view:
active: po
featureGates:
# 切换NodeShell支持。如果需要,允许k9进入节点。默认false
nodeShell: false
shellPod:
# 要使用 shell 的pod 的镜像
image: busybox:1.31
namespace: default
limits:
cpu: 100m
memory: 100Mi
portForwardAddress: localhost
thresholds:
cpu:
critical: 90
warn: 70
memory:
critical: 90
warn: 70
在 ~/.k9s/config.yml
k9s:
refreshRate: 2
maxConnRetry: 5
enableMouse: false
headless: false
logoless: false
crumbsless: false
readOnly: false
noIcons: false
logger:
tail: 100
buffer: 5000
sinceSeconds: 60
fullScreenLogs: false
textWrap: false
showTime: false
currentContext: sit
currentCluster: sit-cluster
clusters:
pprd-cluster:
namespace:
active: cattle-logging
favorites:
- default
view:
active: po
featureGates:
nodeShell: false
shellPod:
image: busybox:1.31
namespace: default
limits:
cpu: 100m
memory: 100Mi
portForwardAddress: localhost
sit-cluster:
namespace:
active: crp
favorites:
- crp
- all
- default
- istio-system
- open
view:
active: pods default
featureGates:
nodeShell: false
shellPod:
image: busybox:1.31
namespace: default
limits:
cpu: 100m
memory: 100Mi
portForwardAddress: localhost
uat-cluster:
namespace:
active: cattle-logging
favorites:
- default
view:
active: po
featureGates:
nodeShell: false
shellPod:
image: busybox:1.31
namespace: default
limits:
cpu: 100m
memory: 100Mi
portForwardAddress: localhost
thresholds:
cpu:
critical: 90
warn: 70
memory:
critical: 90
warn: 70
在 ~/.kube/config
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM3akNDQWRhZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFvTVJJd0VBWURWUVFLRXdsMGFHVXQKY21GdVkyZ3hFakFRQmdOVkJBTVRDV05oZEhSc1pTMWpZVEFlRncweU1UQXhNVFF3TmpBM05UQmFGdzB6TVRBeApNVEl3TmpBM05UQmFNQ2d4RWpBUUJnTlZCQW9UQ1hSb1pTMXlZVzVqYURFU01CQUdBMVVFQXhNSlkyRjBkR3hsCkxXTmhNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTNoSXVWRktYbWRxenQyZnoKQ3RYZVlPNHFzTVNNeGFKdmVPQWFSQ0FIM0w0bSt0cTFiQ1JaSW1wSkkwM3JXL0JQSkZLV0tKTHNxUXFudjVhQQpQMzZsSllNVm9Yb2VtRkM5ZHY0ckxENnppdHlvZDBYclAySU5NM2lqbEtxZFIraDl5ejJ3VlVYUm1OTytlSnJjCmJXNXB2OVI5QnNqZFpFZG9JaU5jWnhDNkx0NStLWnVXUmRHR1loYTJERllmd3d6NXMvdDNzWVRHQ0tiajllZk8KcFBKT2RCb0VJZ0xuU2RTbkR0M3VUTEJ0dHNvZFpqenhzMDBsZzBQVW1WTWlzdzNGSG5zNzFKUUNTNE5hbTFrUQpza3VPR1B6M1RPekwzSEZ5d0xtd3dQSmFHYlZqU1BWU05ZVVdCQnc5KzN3Y1la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VaQjFyZGdNeUtKVAp0SVQvOWtxRzIrMnBQNXprcnpzeXRPOVNveVVHZU5nd1hJZDloeXE4OEgxRjhIUWthQUNjWjhxbDZzNThMZkdzCktpakxVVDNZV0JTUEVOaDdrNnBHM2x1eHpJM2RNbXROd3pha3Zrdm1XZWd5YnpkMTh4Wks4L1I1bEc4VXd3aE4KMjB2NTBYaDlCc21TTlYvdi9wS2Nob1ljNEF2WmNhM0VDbFNTTlBwRlU4ZndzWXB2TzQ4U2I1bVRUTGRDd1BpTAo2aG1JSWdMOUQybFpVUWFTU2huTWJjT0wzRHFuTFp3TitucHBRZm5KZnFySzYxZkp4b3VaQ0ZPYVphU2VxMXM5ClpUMzVhbjZJRE5xRGw2WFV1Z2hWWS9VY3BjbmUyOTBLbWdzSFBIaDAvMjI5dUE9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0t
server: https://88.4.42.79:443/k8s/clusters/c-7k5rm
name: uat-cluster
contexts:
- context:
cluster: pprd-cluster
namespace: default
user: zc-pprd
name: pprd
- context:
cluster: sit-cluster
namespace: default
user: zc-sit
name: sit
- context:
cluster: uat-cluster
namespace: default
user: zc-uat
name: uat
current-context: sit
kind: Config
preferences: {}
users:
- name: zc-pprd
user:
token: kubeconfig-u-bctzg.c-kpbtb:z85rzzbkhl7qt9mmtdsq4v5dghcz27ljlb7qt58trbdp66hrxw9r5m
- name: zc-sit
user:
token: kubeconfig-u-bs5d5.c-h6qpt:cqc844w9xpcp8486vwzjfrgl622s5wbk2n88fmz9w2p2nhhn7qm848
- name: zc-uat
user:
token: kubeconfig-u-bs5d5.c-7k5rm:kjjkg69xhn274q6sjnx6m8zr9fktdwlhd7m6fsmb7fckdn7nr5kk7p