当前位置:网站首页>Kubernetes log viewer - kubetail
Kubernetes log viewer - kubetail
2022-06-24 12:25:00 【Honest1y】
1 problem
Suppose there is one in the cluster deployment, Replications for 3, You need to check Pod Log time ,kubectl default log The command does not support multi container log viewing .
2 kubetail Introduce
Kubetail It's a Bash Script , The function is similar to kubectl -f logs pod-name, But here's the difference , He speaks to multiple people at the same time Pod Work , And merge the logs into one stream .
3 install
MacOS
brew tap johanhaleby/kubetail && brew install kubetail
4 Use
Kubetail It's also very simple to use , The basic grammar is as follows :
kubetail <search term> [-h] [-c] [-n] [-t] [-l] [-d] [-p] [-s] [-b] [-k] [-v] [-r] [-i] -- tail multiple Kubernetes pod logs at the same time
4.1 Parameter interpretation
-c: Specify multiple containers Pod Container name in -t: Appoint Kubeconfig In the document Context -l: Tag filter , Use -l After the parameters , Will ignore Pod name -n: Specify the namespace -s: Specifies to return the log after a relative time , for example 5s,2m perhaps 3h, The default is 10s -b: Whether to use line-buffered, Default is false -k: Specify the specific shaded part of the output content ,pod: Only to pod Color the name ,line: Color the whole line ( default ),false: No coloring
4.2 Examples of use
$ kubetail my-pod-v1 $ kubetail my-pod-v1 -c my-container $ kubetail my-pod-v1 -t int1-context -c my-container $ kubetail '(service|consumer|thing)' -e regex $ kubetail -l service=my-service $ kubetail --selector service=my-service --since 10m $ kubetail --tail 1
边栏推荐
- Tencent cloud and the ICT Institute launched the preparation of the "cloud native open source white paper" to deeply interpret cloud native
- Jenkins pipeline syntax
- Opencv learning notes -- Separation of color channels and multi-channel mixing
- 【Go语言刷题篇】Go从0到入门4:切片的高级用法、初级复习与Map入门学习
- How to purchase new bonds is it safe to open an account
- Speculation London gold short-term stable money making skills? Where is it safe to fry London gold?
- [redisson] analysis of semaphore lock source code
- 10 zeros of D
- [Old Wei makes machines] issue 090: keyboard? host? Full function keyboard host!
- Easynvr user login is modified to share the modification process of ip+ user name restriction
猜你喜欢
[Old Wei makes machines] issue 090: keyboard? host? Full function keyboard host!

Group planning - General Review

如何优雅的写 Controller 层代码?

Installation and operation of libuv
Deep parsing and implementation of redis pub/sub publish subscribe mode message queue

u盘安装kali并且持久化

ArrayList # sublist these four holes, you get caught accidentally

我真傻,招了一堆只会“谷歌”的程序员!

链接器 --- Linker

FreeRTOS概述与体验
随机推荐
Opencv learning notes - Discrete Fourier transform
VaR in PHP_ export、print_ r、var_ Differences in dump debugging
GLOG from getting started to getting started
Discussion on redis communication protocol
[Architect (Part 41)] installation of server development and connection to redis database
Opencv learning notes - regions of interest (ROI) and image blending
计组-总复习
Jenkins performance test
The idea of "6 points + gene family" without experiment~
11+ article - machine learning builds Protics framework - deeply reveals the impact of tumor infiltrating immune cells in different molecular subtypes on prognosis
集群控制管理
数据标注科普:十种常见的图像标注方法
Do you really know "open source"? Please check [nanny level] open source Encyclopedia
[go language questions] go from 0 to entry 4: advanced usage of slice, elementary review and introduction to map
Deep learning ~11+ a new perspective on disease-related miRNA research
Database migration tool flyway vs liquibase (II)
[mysql_16] variables, process control and cursors
深圳市人民医院程立新课题组提出多组学数据在肝细胞癌的诊断与预后分析的新方法meGPS
Jenkins remote publishing products
How to make Baidu quickly include its own personal website?