首页 > 其他分享 >es for k8s

es for k8s

时间:2024-01-10 14:48:04浏览次数:31  
标签:name ik nfs k8s data es metadata

deploy.yaml

基于nfs

apiVersion: v1
kind: PersistentVolume
metadata:
  name: es-pv-data
  namespace: test
spec:
  capacity:
    storage: 1Gi
  accessModes:
  - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  storageClassName: es-data-nfs
  nfs:
    path: /data/nfs/es/data
    server: 192.168.137.100
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: es-data-pvc
  namespace: test
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
  storageClassName: es-data-nfs
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: es-pv-ik
  namespace: test
spec:
  capacity:
    storage: 1Gi
  accessModes:
  - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  storageClassName: es-ik-nfs
  nfs:
    path: /data/nfs/es/ik
    server: 192.168.137.100
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: es-ik-pvc
  namespace: test
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
  storageClassName: es-ik-nfs
---
apiVersion: v1
kind: Service
metadata:
  name: es-svc
  namespace: test
spec:
  ports:
  - name: web-9200
    port: 9200
  - name: web-9300
    port: 9300
  selector:
    app: es
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: es
  namespace: test
  labels:
    app: es
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: es
  template:
    metadata:
      labels:
        app: es
    spec:
      containers:
      - name: es
        image: elasticsearch:7.17.6
        imagePullPolicy: Always
        env:
          - name: ES_JAVA_OPTS
            value: "-Xms512m -Xmx512m"
          - name: cluster.name
            value: "elasticsearch"
          - name: discovery.type
            value: "single-node"
        ports:
        - containerPort: 9200
        - containerPort: 9300
        volumeMounts:
        - name: es-data
          mountPath: /usr/share/elasticsearch/data
        - name: es-ik
          mountPath: /usr/share/elasticsearch/plugins/ik
      volumes:
      - name: es-data
        persistentVolumeClaim:
          claimName: es-data-pvc
      - name: es-ik
        persistentVolumeClaim:
          claimName: es-ik-pvc

es-ingress.yaml

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: es-ingress
  namespace: test
spec:
  rules:
    - host: estest.demo.com
      http:
        paths:
          - path: /
            backend:
              serviceName: es-svc
              servicePort: 9200

 

标签:name,ik,nfs,k8s,data,es,metadata
From: https://www.cnblogs.com/cgpei/p/17956425

相关文章

  • nacos for k8s
    nacos-deploy.yaml基于nfs---apiVersion:v1kind:Servicemetadata:name:nacos-headlessnamespace:testlabels:app:nacos-headlessspec:type:ClusterIPports:-port:8848name:servertargetPort:8848-port:9848......
  • k8s集群搭建1.22.x (centos)
    版本1.22.xx版本兼容 集群搭建指导https://www.cnblogs.com/Sunzz/p/15184167.html  【1.18】https://blog.csdn.net/qq_34629877/article/details/120234616 【1.22】升级centos内核#导入公钥rpm--importhttps://www.elrepo.org/RPM-GPG-KEY-elrepo.org#安装......
  • redis for k8s
    deploy.yaml基于nfs的存储apiVersion:v1kind:ConfigMapmetadata:name:redis-cmnamespace:testdata:redis.conf:|+requirepass1314521protected-modenoport6379tcp-backlog511timeout0tcp-keepalive300daemonizeno......
  • ESP8266-01S 散文
    ESP8266散文IO-0角:用于固件的烧入烧入流程--->IO-0脚拉低----->通过串口通信RxTx烧入对应的信息AT测试AT启动OKAT+RST重启模块OKAT+CWMODE=1/2/3设置Wi-Fi模式(Station/SoftAP/Station+SoftAP)OKAT+CWJAP="SSID","PWD"设置ESP8266Station需连接的AP--连接WIFI......
  • 优雅而强力地卸载docker-desktop
    DockerDesktop可正常使用打开DockerDesktop,然后点击troubleshoot:再点击uninstall。DockerDesktop不可用[email protected]%sudo/Applications/Docker.app/Contents/MacOS/Docker--uninstallPassword:打不开DockerDesktop且情况二无法解决sud......
  • 使用nestjs和react快速搭建项目架子
    首先搭建前后端的项目架子搭建nestjs架子npx@nestjs/clinew项目名使用vite搭建一个react+ts的架子,vite地址:https://cn.vitejs.dev/guide/。搭建好后cd到项目中,然后安装依赖,尝试启动。npmcreatevite@latest项目名----templatereact-ts数据库使用postgresql,使用do......
  • No appropriate protocol (protocol is disabled or cipher suites are inappropriate
    问题原因:jdk版本过高导致,jdk1.8高版本对ssl做了限制1、在URL中添加在数据库后面添加?createDatabaseIfNotExist=true&useSSL=false2、修改JDK下的为java.security文件文件里查找:jdk.tls.disabledAlgorithms= 然后把红色部分删除。3、直接降低jdk版本(本人将jdk1.8.0_29......
  • Codeforces [Hello 2024]
    CodeforcesHello2024主打一个昏了头A.WalletExchange#include<bits/stdc++.h>#defineendl'\n'//#defineintlonglongusingnamespacestd;constintN=2e5+10;inta,b;voidsolve(){ cin>>a>>b; if((a+b)&1)cout<<......
  • AtCoder Beginner Contest 335 总结
    ABC335总结A.202<s>3</s>翻译给你一个由小写英文字母和数字组成的字符串\(S\)。\(S\)保证以2023结尾。将\(S\)的最后一个字符改为4,并打印修改后的字符串。分析两种做法:直接把最后一个字符改为4,然后输出。输出前\(n\)个字符后输出4。code#include<bits/stdc......
  • 【五期李伟平】CCF-A(MobiCom'18 Session EdgeTech'18)A Game-Theoretic Approach to Mu
    Zafari,Faheem,etal."AGame-TheoreticApproachtoMulti-ObjectiveResourceSharingandAllocationinMobileEdgeClouds."(2018).  为了缓解移动边缘计算中资源稀缺问题,本文建议在多个边缘计算服务提供商之间共享资源,并将资源分配和共享问题建模为多目标优化......