当前位置:网站首页>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
边栏推荐
- Tsingsee green rhino video "cloud side end" +ai intelligent security system is integrated into the mainstream development trend
- pipeline groovy
- The world's largest meat processor has been "blackmailed", how many industries will blackmail virus poison?
- OpenGL es shared context for multi-threaded rendering
- How to make Baidu quickly include its own personal website?
- 怎样申请打新债 开户是安全的吗
- Example of SMS interface verification code function implemented by ThinkPHP framework
- Programmers spend most of their time not writing code, but...
- Istio FAQ: istio init crash
- 11+! 结肠癌中基于 m6A 调节因子的甲基化修饰模式以不同的肿瘤微环境免疫谱为特征
猜你喜欢

Tools and methods - use code formatting tools in source insight

Ten thousand campus developers play AI in a fancy way. It's enough to see this picture!

GLOG from getting started to getting started

FreeRTOS概述与体验

Group planning - General Review
![[live review] battle code pioneer phase 7: how third-party application developers contribute to open source](/img/fa/e52bd8a1a404a759ef6ba88e8da0f0.png)
[live review] battle code pioneer phase 7: how third-party application developers contribute to open source
【老卫搞机】090期:键盘?主机?全功能键盘主机!
![[go language questions] go from 0 to entry 4: advanced usage of slice, elementary review and introduction to map](/img/7a/16b481753d7d57f50dc8787eec8a1a.png)
[go language questions] go from 0 to entry 4: advanced usage of slice, elementary review and introduction to map

AXI低功耗接口

u盘安装kali并且持久化
随机推荐
Tools and methods - use code formatting tools in source insight
炒伦敦金短线稳定赚钱技巧?在哪里炒伦敦金安全靠谱?
怎么申请打新债 开户是安全的吗
11+! 结肠癌中基于 m6A 调节因子的甲基化修饰模式以不同的肿瘤微环境免疫谱为特征
计组-总复习
11+! Methylation modification patterns based on m6A regulatory factors in colon cancer are characterized by different tumor microenvironment immune spectra
9+!通过深度学习从结直肠癌的组织学中预测淋巴结状态
Opencv learning notes - loading and saving images
Continuous testing | test process improvement: practice continuous testing within iterations in coding
Pipeline shared library
Group planning - General Review
Basic path test of software test on the function of the previous day
OpenGL es shared context for multi-threaded rendering
GTEST from getting started to getting started
Can Tencent's tendis take the place of redis?
Install Kali on the U disk and persist it
JVM GC garbage collection detailed introduction quick check of learning notes
How to open a new bond? Is it safe to open an account
打新债可以申请多少 开户是安全的吗
[day ui] alert component learning