forked from aks/kubetail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkubetail.man
145 lines (137 loc) · 2.87 KB
/
kubetail.man
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
.TH kubetail 1 "22 Feb 2017" "Version @@VERSION@@"
.SH NAME
kubetail \- tail multiple kubernetes pod logs at the same time
.SH SYNOPSIS
.B kubetail
.B [
.I options
.B ] [
.I PATTERN
.B ]
.SH DESCRIPTION
Select all pods with names matching
.IR PATTERN ,
or those matching the given
options, and follow the logs for those pods. Unless
.B -T
is used, the output
tail logs are managed by
.BR multitail (1)
(if it is available). With
.BR -T ,
a simple bash function is used to process each line of output.
.PP
By default and if available,
.B multitail
is used, along with a configuration
file that contains a color scheme. The color scheme used for each pod log is
the base pod name. For example, if the pod name is
.BR "princess-3127303711-tzk06" ,
then the pod base name and color scheme is
.BR 'princess' .
The color scheme is
used
.I only
if it is defined as a
.I 'colorscheme'
in the multitail configuration file.
.PP
The search path for the
.I kube-multitail.conf
file is a list of
directories:
.IR '.' ,
.IR '$HOME' ,
.IR '$HOME/etc' ,
and
.IR '/usr/local/etc' .
The configuration filename may optionally be prefixed with a period
.IR '.' .
.SH OPTIONS
.TP 2.5i
.BR -h ", " --help
Show this help text
.TP
.BR -c ", " "--container \fINAME\fR"
The container name (if multiple containers are defined). Default is none
.TP
.BR -t ", " "--context \fINAME\fR"
The kubernetes context name. Eg:
.IR int1-context .
Relies on
.I ~/.kube/config
for the contexts.
.TP
.BR -l ", " "--selector \fINAME\fR"
Label selector. If used the pod name is ignored.
.TP
.BR -n ", " "--namespace \fINAME\fR"
The Kubernetes namespace where the pods are located (defaults to
.IR default )
.TP
.BR -s ", " "--since \fIWHEN\fR"
Only return logs newer than a relative duration like
.BR 5s , 2m ,
or
.BR 3h .
Defaults to
BR 10s .
.TP
.BR -b ", " --line-buffered
Boolean indicating output should be line-buffered.
.TP
.BR -k ", " "--colored-output \fIHOW\fR"
Use colored output:
.BR pod ", " line ", "
or
.BR false .
.TP
.BR -C ", " "--colorscheme \fINAME\fR"
use multitail colorschame NAME
.TP
.BR -G ", " --no-configfile
do not load multitail config file
.TP
.BR -v ", " --verbose
show the commands
.TP
.BR -N ", " --norun
don't execute the commands, but show them
.TP
.BR -T ", " --not-multitail
do not use
.BR multitail.
.PP
When using
.BR -k " (or " --colored-output ),
the values have these meanings:
.RS
.IP \fBpod\fR
only color podname
.IP \fBline\fR
color entire line
.IP \fBfalse\fR
don't use any colors.
.RE
.PP
The default is
.BR pod .
.SH EXAMPLES
.FT CW
kubetail my-pod-v1
.br
kubetail my-pod-v1 -c my-container
.br
kubetail my-pod-v1 -t int1-context -c my-container
.br
kubetail -l service=my-service
.br
kubetail --selector service=my-service --since 10m
.FT R
.SH AUTHOR
.BR "Johan Haleby" "\- original bash script"
.br
.BI "Alan Stebbens" " <[email protected]>"
\- enhanced bash script with mulitail integration.
.SH SEE ALSO
.BR mulitail (1)