File tree Expand file tree Collapse file tree 8 files changed +229
-0
lines changed Expand file tree Collapse file tree 8 files changed +229
-0
lines changed Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : StatefulSet
3
+ metadata :
4
+ name : es-cluster
5
+ spec :
6
+ serviceName : elasticsearch
7
+ replicas : 3
8
+ selector :
9
+ matchLabels :
10
+ app : elasticsearch
11
+ template :
12
+ metadata :
13
+ labels :
14
+ app : elasticsearch
15
+ spec :
16
+ containers :
17
+ - name : elasticsearch
18
+ image : docker.elastic.co/elasticsearch/elasticsearch:7.5.0
19
+ resources :
20
+ limits :
21
+ cpu : 1000m
22
+ requests :
23
+ cpu : 100m
24
+ ports :
25
+ - containerPort : 9200
26
+ name : rest
27
+ protocol : TCP
28
+ - containerPort : 9300
29
+ name : inter-node
30
+ protocol : TCP
31
+ volumeMounts :
32
+ - name : data
33
+ mountPath : /usr/share/elasticsearch/data
34
+ env :
35
+ - name : cluster.name
36
+ value : k8s-logs
37
+ - name : node.name
38
+ valueFrom :
39
+ fieldRef :
40
+ fieldPath : metadata.name
41
+ - name : discovery.seed_hosts
42
+ value : " es-cluster-0.elasticsearch,es-cluster-1.elasticsearch,es-cluster-2.elasticsearch"
43
+ - name : cluster.initial_master_nodes
44
+ value : " es-cluster-0,es-cluster-1,es-cluster-2"
45
+ - name : ES_JAVA_OPTS
46
+ value : " -Xms512m -Xmx512m"
47
+ initContainers :
48
+ - name : fix-permissions
49
+ image : busybox
50
+ command : ["sh", "-c", "chown -R 1000:1000 /usr/share/elasticsearch/data"]
51
+ securityContext :
52
+ privileged : true
53
+ volumeMounts :
54
+ - name : data
55
+ mountPath : /usr/share/elasticsearch/data
56
+ - name : increase-vm-max-map
57
+ image : busybox
58
+ command : ["sysctl", "-w", "vm.max_map_count=262144"]
59
+ securityContext :
60
+ privileged : true
61
+ - name : increase-fd-ulimit
62
+ image : busybox
63
+ command : ["sh", "-c", "ulimit -n 65536"]
64
+ securityContext :
65
+ privileged : true
66
+ volumeClaimTemplates :
67
+ - metadata :
68
+ name : data
69
+ labels :
70
+ app : elasticsearch
71
+ spec :
72
+ accessModes : [ "ReadWriteOnce" ]
73
+ # storageClassName: ""
74
+ resources :
75
+ requests :
76
+ storage : 3Gi
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Service
3
+ metadata :
4
+ name : elasticsearch
5
+ labels :
6
+ app : elasticsearch
7
+ spec :
8
+ selector :
9
+ app : elasticsearch
10
+ clusterIP : None
11
+ ports :
12
+ - port : 9200
13
+ name : rest
14
+ - port : 9300
15
+ name : inter-node
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : DaemonSet
3
+ metadata :
4
+ name : fluentd
5
+ labels :
6
+ app : fluentd
7
+ spec :
8
+ selector :
9
+ matchLabels :
10
+ app : fluentd
11
+ template :
12
+ metadata :
13
+ labels :
14
+ app : fluentd
15
+ spec :
16
+ serviceAccount : fluentd
17
+ serviceAccountName : fluentd
18
+ containers :
19
+ - name : fluentd
20
+ image : fluent/fluentd-kubernetes-daemonset:v1.4.2-debian-elasticsearch-1.1
21
+ env :
22
+ - name : FLUENT_ELASTICSEARCH_HOST
23
+ value : " elasticsearch.default.svc.cluster.local"
24
+ - name : FLUENT_ELASTICSEARCH_PORT
25
+ value : " 9200"
26
+ - name : FLUENT_ELASTICSEARCH_SCHEME
27
+ value : " http"
28
+ - name : FLUENTD_SYSTEMD_CONF
29
+ value : disable
30
+ resources :
31
+ limits :
32
+ memory : 512Mi
33
+ requests :
34
+ cpu : 100m
35
+ memory : 200Mi
36
+ volumeMounts :
37
+ - name : varlog
38
+ mountPath : /var/log
39
+ # When actual pod logs in /var/lib/docker/containers, the following lines should be used.
40
+ # - name: dockercontainerlogdirectory
41
+ # mountPath: /var/lib/docker/containers
42
+ # readOnly: true
43
+ # When actual pod logs in /var/log/pods, the following lines should be used.
44
+ - name : dockercontainerlogdirectory
45
+ mountPath : /var/opt/Marklogic/Logs
46
+ readOnly : true
47
+ terminationGracePeriodSeconds : 30
48
+ volumes :
49
+ - name : varlog
50
+ hostPath :
51
+ path : /var/log
52
+ # When actual pod logs in /var/lib/docker/containers, the following lines should be used.
53
+ # - name: dockercontainerlogdirectory
54
+ # hostPath:
55
+ # path: /var/lib/docker/containers
56
+ # When actual pod logs in /var/log/pods, the following lines should be used.
57
+ - name : dockercontainerlogdirectory
58
+ hostPath :
59
+ path : /var/opt/Marklogic/Logs
Original file line number Diff line number Diff line change
1
+ kind : ClusterRoleBinding
2
+ apiVersion : rbac.authorization.k8s.io/v1
3
+ metadata :
4
+ name : fluentd
5
+ roleRef :
6
+ kind : ClusterRole
7
+ name : fluentd
8
+ apiGroup : rbac.authorization.k8s.io
9
+ subjects :
10
+ - kind : ServiceAccount
11
+ name : fluentd
12
+ namespace : default
Original file line number Diff line number Diff line change
1
+ apiVersion : rbac.authorization.k8s.io/v1
2
+ kind : ClusterRole
3
+ metadata :
4
+ name : fluentd
5
+ labels :
6
+ k8s-app : fluentd-logging
7
+ rules :
8
+ - apiGroups :
9
+ - " "
10
+ resources :
11
+ - pods
12
+ - namespaces
13
+ verbs :
14
+ - get
15
+ - list
16
+ - watch
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : ServiceAccount
3
+ metadata :
4
+ name : fluentd
5
+ labels :
6
+ k8s-app : fluentd-logging
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Service
3
+ metadata :
4
+ name : kibana
5
+ labels :
6
+ app : kibana
7
+ spec :
8
+ ports :
9
+ - port : 5601
10
+ selector :
11
+ app : kibana
12
+ ---
13
+ apiVersion : apps/v1
14
+ kind : Deployment
15
+ metadata :
16
+ name : kibana
17
+ labels :
18
+ app : kibana
19
+ spec :
20
+ replicas : 1
21
+ selector :
22
+ matchLabels :
23
+ app : kibana
24
+ template :
25
+ metadata :
26
+ labels :
27
+ app : kibana
28
+ spec :
29
+ containers :
30
+ - name : kibana
31
+ image : docker.elastic.co/kibana/kibana:7.2.0
32
+ resources :
33
+ limits :
34
+ cpu : 1000m
35
+ requests :
36
+ cpu : 100m
37
+ env :
38
+ - name : ELASTICSEARCH_URL
39
+ value : http://elasticsearch:9200
40
+ ports :
41
+ - containerPort : 5601
Original file line number Diff line number Diff line change
1
+ kind : Namespace
2
+ apiVersion : v1
3
+ metadata :
4
+ name : kube-logging
You can’t perform that action at this time.
0 commit comments