Myluzh Blog

K8S部署Elasticsearch集群(Elasticsearch Operator)[ECK]

2024-11-7 myluzh Kubernetes

0x00 关于ECK 对于 Elasticsearch 应用,官方也推出了基于 Kubernetes Operator 的应用:Elastic Cloud on Kubernetes (ECK),用户可使用该产品在 Kubernetes 上配置、管理和运行 Elasticsearch 集群。 0x01 在K8S中部署ECK 由于我这边k8s版本是1.20,所以兼容ECK的版本是2.4.0 root@k8s-master:~# kubectl create -f https://download.elastic.co/downloads/eck/2.4.0/crds.yaml customresourcedefinition.apiextensions.k8s.io/agents.agent.k8s.elastic.co created customresourcedefinition.apiextensions.k8s.io/apmservers.apm.k8s.elastic.co created customresourcedefinition.apiextensions.k8s.io/beats.beat.k8s.e...

阅读全文>>

标签: k8s 集群 部署 k8s部署 apply elasticsearch elasticsearch7 es ECK Elasticsearch Operator es cluster

评论(0) (63)

K8S部署Kibana

2024-9-14 myluzh Kubernetes

0x01 部署Kibana 1、编写yaml文件 apiVersion: v1 kind: Service metadata: name: kibana namespace: elastic-worker labels: k8s-app: kibana kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile kubernetes.io/name: "Kibana" srv: srv-kibana spec: type: NodePort ports: - port: 5601 nodePort: 30000 protocol: TCP targetPort: ui selector: k8s-app: kibana --- apiVersion: apps/v1 kind: Deployment metadata: name: kibana namespace: elastic-worker ...

阅读全文>>

标签: k8s kibana k8s部署 apply

评论(0) (97)

K8S部署Elasticsearch 并开启X-Pack安全认证

2024-9-14 myluzh Kubernetes

0x00 制作带有证书的镜像 基于 Elasticsearch 的官方镜像创建一个新的自定义镜像,将证书文件包含在内。 1、生成证书 # 创建一个es-temp容器,生成elastic-certificates.p12 docker run -it --name es-temp elasticsearch:7.17.24 bash -c "bin/elasticsearch-certutil cert -out config/elastic-certificates.p12 -pass '' && ls -l config/elastic-certificates.p12" # 把es-temp里面的elastic-certificates.p12复制到本地来 docker cp es-temp:/usr/share/elasticsearch/config/elastic-certificates.p12 ./elastic-certificates.p12 2、构建镜像 FROM elasticsearch:7.17.24 LABEL maintainer="myluzh <...

阅读全文>>

标签: k8s 部署 k8s部署 apply elasticsearch elasticsearch7 es 单节点

评论(0) (114)