tcs update
parent
70dfe24529
commit
b5e0a1e176
|
@ -1,3 +1,81 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: elastic-tcs-0
|
||||||
|
spec:
|
||||||
|
storageClassName: elastic-tcs
|
||||||
|
capacity:
|
||||||
|
storage: 30Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
local:
|
||||||
|
path: /data/elastic-tcs/es_data
|
||||||
|
claimRef:
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
namespace: tcs
|
||||||
|
name: elastic-tcs-elastic-0
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- bfs-k8snode-10-2-1-5.hetzner.base.beaconfireinc.com
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: elastic-tcs-1
|
||||||
|
spec:
|
||||||
|
storageClassName: elastic-tcs
|
||||||
|
capacity:
|
||||||
|
storage: 30Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
local:
|
||||||
|
path: /data/elastic-tcs/es_data
|
||||||
|
claimRef:
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
namespace:
|
||||||
|
name: elastic-tcs-elastic-1
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- bfs-k8snode-10-2-1-6.hetzner.base.beaconfireinc.com
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: elastic-tcs-2
|
||||||
|
spec:
|
||||||
|
storageClassName: elastic-tcs
|
||||||
|
capacity:
|
||||||
|
storage: 30Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
local:
|
||||||
|
path: /data/elastic-tcs/es_data
|
||||||
|
claimRef:
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
namespace: tcs
|
||||||
|
name: elastic-tcs-elastic-2
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- bfs-k8snode-10-2-1-7.hetzner.base.beaconfireinc.com
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
|
@ -17,18 +95,21 @@ spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 100
|
fsGroup: 100
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/arch: amd64
|
app.kubernetes.io/name: es-tcs
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init
|
- name: init
|
||||||
image: busybox
|
image: busybox
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
command: ["/bin/sh", "-c", "sysctl -w vm.max_map_count=262144"]
|
command: ["/bin/sh", "-c", "sysctl -w vm.max_map_count=262144;chown -R 1000:1000 /usr/share/elasticsearch/data"]
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- name: elastic-tcs
|
||||||
|
mountPath: /usr/share/elasticsearch/data
|
||||||
containers:
|
containers:
|
||||||
- name: elasticsearch
|
- name: elasticsearch
|
||||||
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0
|
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.3
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 9200
|
- containerPort: 9200
|
||||||
name: restful
|
name: restful
|
||||||
|
@ -36,7 +117,7 @@ spec:
|
||||||
name: transport
|
name: transport
|
||||||
env:
|
env:
|
||||||
- name: cluster.name
|
- name: cluster.name
|
||||||
value: bfs-elastic-1
|
value: bfs-elastic-tcs-1
|
||||||
- name: network.host
|
- name: network.host
|
||||||
value: 0.0.0.0
|
value: 0.0.0.0
|
||||||
- name: node.name
|
- name: node.name
|
||||||
|
@ -48,11 +129,9 @@ spec:
|
||||||
- name: cluster.initial_master_nodes
|
- name: cluster.initial_master_nodes
|
||||||
value: "elastic-0,elastic-1,elastic-2"
|
value: "elastic-0,elastic-1,elastic-2"
|
||||||
- name: xpack.security.enabled
|
- name: xpack.security.enabled
|
||||||
value: "true"
|
value: "false"
|
||||||
- name: xpack.security.transport.ssl.enabled
|
|
||||||
value: "true"
|
|
||||||
- name: xpack.monitoring.collection.enabled
|
- name: xpack.monitoring.collection.enabled
|
||||||
value: "true"
|
value: "false"
|
||||||
- name: ES_JAVA_OPTS
|
- name: ES_JAVA_OPTS
|
||||||
value: "-Xms256m -Xmx256m"
|
value: "-Xms256m -Xmx256m"
|
||||||
- name: ELASTIC_PASSWORD
|
- name: ELASTIC_PASSWORD
|
||||||
|
@ -65,14 +144,14 @@ spec:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
memory: 128Mi
|
memory: 128Mi
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: es-data
|
- name: elastic-tcs
|
||||||
mountPath: /usr/share/elasticsearch/data
|
mountPath: /usr/share/elasticsearch/data
|
||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
- metadata:
|
- metadata:
|
||||||
name: es-data
|
name: elastic-tcs
|
||||||
spec:
|
spec:
|
||||||
accessModes: ['ReadWriteOnce']
|
accessModes: ['ReadWriteOnce']
|
||||||
storageClassName: "local-elastic"
|
storageClassName: "elastic-tcs"
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 30Gi
|
storage: 30Gi
|
||||||
|
@ -89,16 +168,16 @@ spec:
|
||||||
- name: restful
|
- name: restful
|
||||||
port: 9200
|
port: 9200
|
||||||
targetPort: 9200
|
targetPort: 9200
|
||||||
nodePort: 30020
|
# nodePort: 30029
|
||||||
type: NodePort
|
type: NodePort
|
||||||
selector:
|
selector:
|
||||||
app: elastic
|
app: elastic
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: elastic
|
name: elastic
|
||||||
labels:
|
labels:
|
||||||
app: elastic
|
app: elastic
|
||||||
spec:
|
spec:
|
||||||
|
@ -110,3 +189,4 @@ spec:
|
||||||
clusterIP: None
|
clusterIP: None
|
||||||
selector:
|
selector:
|
||||||
app: elastic
|
app: elastic
|
||||||
|
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: kibana-config
|
|
||||||
data:
|
|
||||||
kibana.yml: |-
|
|
||||||
server.name: kibana
|
|
||||||
server.host: 0.0.0.0
|
|
||||||
elasticsearch.hosts: [ "http://elastic:9200" ]
|
|
||||||
monitoring.ui.container.elasticsearch.enabled: true
|
|
||||||
elasticsearch.username: kibana-admin
|
|
||||||
elasticsearch.password: admin123
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: kibana
|
|
||||||
labels:
|
|
||||||
app: kibana
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: 5601
|
|
||||||
targetPort: 5601
|
|
||||||
nodePort: 30019
|
|
||||||
selector:
|
|
||||||
app: kibana
|
|
||||||
type: NodePort
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: kibana
|
|
||||||
labels:
|
|
||||||
app: kibana
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: kibana
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: kibana
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: kibana
|
|
||||||
image: docker.elastic.co/kibana/kibana:8.8.0
|
|
||||||
volumeMounts:
|
|
||||||
- name: config
|
|
||||||
mountPath: /usr/share/kibana/config/kibana.yml
|
|
||||||
subPath: kibana.yml
|
|
||||||
readOnly: true
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 128Mi
|
|
||||||
limits:
|
|
||||||
cpu: 1
|
|
||||||
memory: 1Gi
|
|
||||||
ports:
|
|
||||||
- containerPort: 5601
|
|
||||||
volumes:
|
|
||||||
- name: config
|
|
||||||
configMap:
|
|
||||||
name: kibana-config
|
|
||||||
items:
|
|
||||||
- key: kibana.yml
|
|
||||||
path: kibana.yml
|
|
|
@ -1,74 +1,8 @@
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
|
||||||
name: local-elastic-0
|
|
||||||
spec:
|
|
||||||
storageClassName: local-elastic
|
|
||||||
capacity:
|
|
||||||
storage: 50Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
local:
|
|
||||||
path: /data/elastic/es_data
|
|
||||||
nodeAffinity:
|
|
||||||
required:
|
|
||||||
nodeSelectorTerms:
|
|
||||||
- matchExpressions:
|
|
||||||
- key: kubernetes.io/hostname
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- bfs-k8snode-10-2-1-6.hetzner.base.beaconfireinc.com
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
|
||||||
name: local-elastic-1
|
|
||||||
spec:
|
|
||||||
storageClassName: local-elastic
|
|
||||||
capacity:
|
|
||||||
storage: 50Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
local:
|
|
||||||
path: /data/elastic/es_data
|
|
||||||
nodeAffinity:
|
|
||||||
required:
|
|
||||||
nodeSelectorTerms:
|
|
||||||
- matchExpressions:
|
|
||||||
- key: kubernetes.io/hostname
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- bfs-k8snode-10-2-1-7.hetzner.base.beaconfireinc.com
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
|
||||||
name: local-elastic-2
|
|
||||||
spec:
|
|
||||||
storageClassName: local-elastic
|
|
||||||
capacity:
|
|
||||||
storage: 50Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
local:
|
|
||||||
path: /data/elastic/es_data
|
|
||||||
nodeAffinity:
|
|
||||||
required:
|
|
||||||
nodeSelectorTerms:
|
|
||||||
- matchExpressions:
|
|
||||||
- key: kubernetes.io/hostname
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- bfs-k8snode-10-2-1-8.hetzner.base.beaconfireinc.com
|
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: storage.k8s.io/v1
|
apiVersion: storage.k8s.io/v1
|
||||||
kind: StorageClass
|
kind: StorageClass
|
||||||
metadata:
|
metadata:
|
||||||
name: local-elastic
|
name: elastic-tcs
|
||||||
provisioner: openebs.io/local
|
provisioner: openebs.io/local
|
||||||
allowVolumeExpansion: true
|
allowVolumeExpansion: true
|
||||||
volumeBindingMode: WaitForFirstConsumer
|
volumeBindingMode: WaitForFirstConsumer
|
||||||
|
|
Loading…
Reference in New Issue