Openshift上使用Elasticsearch (ECK) Operator部署ES

部署 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
相关推荐
java1234_小锋7 小时前
Elasticsearch是如何实现Master选举的?
大数据·elasticsearch·搜索引擎
惜.己11 小时前
Jmeter中的断言(二)
测试工具·jmeter·1024程序员节
梦幻通灵13 小时前
ES分词环境实战
大数据·elasticsearch·搜索引擎
Elastic 中国社区官方博客13 小时前
Elasticsearch 中的热点以及如何使用 AutoOps 解决它们
大数据·运维·elasticsearch·搜索引擎·全文检索
小黑屋说YYDS19 小时前
ElasticSearch7.x入门教程之索引概念和基础操作(三)
elasticsearch
西电研梦20 小时前
考研倒计时30天丨和西电一起向前!再向前!
人工智能·考研·1024程序员节·西电·西安电子科技大学
惜.己21 小时前
Jmeter中的断言(四)
测试工具·jmeter·1024程序员节
Java 第一深情21 小时前
Linux上安装单机版ElasticSearch6.8.1
linux·elasticsearch·全文检索
·云扬·1 天前
Java IO 与 BIO、NIO、AIO 详解
java·开发语言·笔记·学习·nio·1024程序员节
网安_秋刀鱼1 天前
PHP代码审计 --MVC模型开发框架&rce示例
开发语言·web安全·网络安全·php·mvc·1024程序员节