部署 7.16.2 版本
Elasticsearch (ECK) Operator部署ES
bash
oc new-project middleware-elasticsearch
yaml
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: es-test
namespace: middleware-elasticsearch
spec:
http:
tls:
selfSignedCertificate:
disabled: true
nodeSets:
- config:
node.roles:
- master
- data
node.store.allow_mmap: false
count: 3
name: master
podTemplate:
metadata:
creationTimestamp: null
spec:
containers:
- name: elasticsearch
resources:
limits:
cpu: '2'
memory: 8Gi
requests:
cpu: '1'
memory: 4Gi
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 512Gi
storageClassName: ???
volumeMode: Filesystem
version: 7.16.2
Elasticsearch (ECK) Operator部署Kibana
yaml
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kibana
namespace: middleware-elasticsearch
spec:
elasticsearchRef:
name: es-test
podTemplate:
spec:
containers:
- name: kibana
resources:
requests:
memory: 1Gi
cpu: 0.5
limits:
memory: 2Gi
cpu: 2
version: 7.16.2
count: 1
revisionHistoryLimit: 0
创建Route
yaml
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: kibana
namespace: middleware-elasticsearch
spec:
host: ???
to:
kind: Service
name: ???-kb-http
weight: 100
port:
targetPort: http
wildcardPolicy: None
部署 8.4.3 版本
Elasticsearch (ECK) Operator部署ES
bash
oc new-project middleware-elasticsearch
yaml
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: es-test
namespace: middleware-es
spec:
http:
tls:
selfSignedCertificate:
disabled: true
nodeSets:
- config:
node.roles:
- master
- data
node.store.allow_mmap: false
count: 3
name: master
podTemplate:
metadata:
creationTimestamp: null
spec:
containers:
- name: elasticsearch
resources:
limits:
cpu: '2'
memory: 8Gi
requests:
cpu: '2'
memory: 4Gi
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 512Gi
storageClassName: xxxx
volumeMode: Filesystem
version: 8.4.3
Elasticsearch (ECK) Operator部署Kibana
yaml
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kibana
namespace: middleware-es
spec:
http:
tls:
selfSignedCertificate:
disabled: true
elasticsearchRef:
name: es-test
podTemplate:
spec:
containers:
- name: kibana
resources:
requests:
memory: 1Gi
cpu: 0.5
limits:
memory: 2Gi
cpu: 2
version: 8.4.3
count: 1
revisionHistoryLimit: 0
创建Route
yaml
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: kibana
namespace: middleware-es
spec:
host: ???
to:
kind: Service
name: ???-kb-http
weight: 100
port:
targetPort: https
wildcardPolicy: None