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
相关推荐
20岁30年经验的码农9 分钟前
爬虫基础
1024程序员节
licy__29 分钟前
计算机网络IP地址分类,子网掩码,子网划分复习资料
1024程序员节
Chris-zz1 小时前
Linux:磁盘深潜:探索文件系统、连接之道与库的奥秘
linux·网络·c++·1024程序员节
JasonYin~1 小时前
《探索 HarmonyOS NEXT(5.0):开启构建模块化项目架构奇幻之旅 —— 模块化基础篇》
1024程序员节
Teamol20202 小时前
求助帖:ubuntu22.10 auto install user-data配置了为何还需要选择语言键盘(如何全自动)
linux·ubuntu·1024程序员节
尘佑不尘2 小时前
shodan5,参数使用,批量查找Mongodb未授权登录,jenkins批量挖掘
数据库·笔记·mongodb·web安全·jenkins·1024程序员节
再拼一次吧3 小时前
Elasticsearch
大数据·elasticsearch·搜索引擎
SeniorMao0073 小时前
结合Intel RealSense深度相机和OpenCV来实现语义SLAM系统
1024程序员节
网安_秋刀鱼3 小时前
CSRF防范及绕过
前端·安全·web安全·网络安全·csrf·1024程序员节