forked from Edu-CKA-Jan06/Training_Documents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
8.+DaemonSet.txt
62 lines (40 loc) · 1.53 KB
/
8.+DaemonSet.txt
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
*************************************************************************************************************************************************
Overview:
~~~~~~~~~~
1. Deploy Pod on "all" worker nodes inside k8s cluster using DaemonSet
1a. fluentd-DaemonSet manifest file
1b. Create | Display | Validate
3. Cleanup
*************************************************************************************************************************************************
1. Deploy Pod on "all" worker nodes inside k8s cluster using DaemonSet
1a. YAML File:
--------------
# fluentd-ds-allnodes.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: fluentd-ds
spec:
template:
metadata:
labels:
name: fluentd
spec:
containers:
- name: fluentd
image: gcr.io/google-containers/fluentd-elasticsearch:1.20
selector:
matchLabels:
name: fluentd
---------------------------------------------------------------------
1b. Create | Display | Validate
kubectl create -f fluentd-ds-allnodes.yaml
kubectl get po -o wide
kubectl get ds
kubectl describe ds fluentd-ds
*************************************************************************************************************************************************
3. Ceanup
kubectl delete ds fluentd-ds
kubectl delete ds nginx-ds
kubectl get po
*************************************************************************************************************************************************