Skip to content

Commit b9b8af1

Browse files
kirkonrulis
authored andcommitted
[ru] Add and translate logging.md
Update content/ru/docs/concepts/cluster-administration/logging.md Co-authored-by: Dmitry Shurupov <[email protected]> Update content/ru/docs/concepts/cluster-administration/logging.md Co-authored-by: Dmitry Shurupov <[email protected]> Update content/ru/docs/concepts/cluster-administration/logging.md Co-authored-by: Dmitry Shurupov <[email protected]> Update content/ru/docs/concepts/cluster-administration/logging.md Co-authored-by: Dmitry Shurupov <[email protected]> Update content/ru/docs/concepts/cluster-administration/logging.md Co-authored-by: Dmitry Shurupov <[email protected]> Update content/ru/docs/concepts/cluster-administration/logging.md Co-authored-by: Dmitry Shurupov <[email protected]> Update content/ru/docs/concepts/cluster-administration/logging.md Co-authored-by: Dmitry Shurupov <[email protected]> Update content/ru/docs/concepts/cluster-administration/logging.md Update content/ru/docs/concepts/cluster-administration/logging.md Add counter-pod.yaml Add two-files-counter-pod.yaml Add two-files-counter-pod.yaml Create two-files-counter-pod-streaming-sidecar.yaml Create fluentd-sidecar-config.yaml Create two-files-counter-pod-agent-sidecar.yaml
1 parent e6fe643 commit b9b8af1

File tree

6 files changed

+343
-0
lines changed

6 files changed

+343
-0
lines changed

content/ru/docs/concepts/cluster-administration/logging.md

Lines changed: 205 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: fluentd-config
5+
data:
6+
fluentd.conf: |
7+
<source>
8+
type tail
9+
format none
10+
path /var/log/1.log
11+
pos_file /var/log/1.log.pos
12+
tag count.format1
13+
</source>
14+
15+
<source>
16+
type tail
17+
format none
18+
path /var/log/2.log
19+
pos_file /var/log/2.log.pos
20+
tag count.format2
21+
</source>
22+
23+
<match **>
24+
type google_cloud
25+
</match>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: counter
5+
spec:
6+
containers:
7+
- name: count
8+
image: busybox:1.28
9+
args:
10+
- /bin/sh
11+
- -c
12+
- >
13+
i=0;
14+
while true;
15+
do
16+
echo "$i: $(date)" >> /var/log/1.log;
17+
echo "$(date) INFO $i" >> /var/log/2.log;
18+
i=$((i+1));
19+
sleep 1;
20+
done
21+
volumeMounts:
22+
- name: varlog
23+
mountPath: /var/log
24+
- name: count-agent
25+
image: k8s.gcr.io/fluentd-gcp:1.30
26+
env:
27+
- name: FLUENTD_ARGS
28+
value: -c /etc/fluentd-config/fluentd.conf
29+
volumeMounts:
30+
- name: varlog
31+
mountPath: /var/log
32+
- name: config-volume
33+
mountPath: /etc/fluentd-config
34+
volumes:
35+
- name: varlog
36+
emptyDir: {}
37+
- name: config-volume
38+
configMap:
39+
name: fluentd-config
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: counter
5+
spec:
6+
containers:
7+
- name: count
8+
image: busybox:1.28
9+
args:
10+
- /bin/sh
11+
- -c
12+
- >
13+
i=0;
14+
while true;
15+
do
16+
echo "$i: $(date)" >> /var/log/1.log;
17+
echo "$(date) INFO $i" >> /var/log/2.log;
18+
i=$((i+1));
19+
sleep 1;
20+
done
21+
volumeMounts:
22+
- name: varlog
23+
mountPath: /var/log
24+
- name: count-log-1
25+
image: busybox:1.28
26+
args: [/bin/sh, -c, 'tail -n+1 -F /var/log/1.log']
27+
volumeMounts:
28+
- name: varlog
29+
mountPath: /var/log
30+
- name: count-log-2
31+
image: busybox:1.28
32+
args: [/bin/sh, -c, 'tail -n+1 -F /var/log/2.log']
33+
volumeMounts:
34+
- name: varlog
35+
mountPath: /var/log
36+
volumes:
37+
- name: varlog
38+
emptyDir: {}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: counter
5+
spec:
6+
containers:
7+
- name: count
8+
image: busybox:1.28
9+
args:
10+
- /bin/sh
11+
- -c
12+
- >
13+
i=0;
14+
while true;
15+
do
16+
echo "$i: $(date)" >> /var/log/1.log;
17+
echo "$(date) INFO $i" >> /var/log/2.log;
18+
i=$((i+1));
19+
sleep 1;
20+
done
21+
volumeMounts:
22+
- name: varlog
23+
mountPath: /var/log
24+
volumes:
25+
- name: varlog
26+
emptyDir: {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: counter
5+
spec:
6+
containers:
7+
- name: count
8+
image: busybox:1.28
9+
args: [/bin/sh, -c,
10+
'i=0; while true; do echo "$i: $(date)"; i=$((i+1)); sleep 1; done']

0 commit comments

Comments
 (0)