在kubernetes中部署企业级ELK并使用其APM( 二 )
然后执行kubectl apply -f ``es-master.yaml创建配置清单 , 然后pod变为running状态即为部署成功 。
# kubectl get pod -n elasticNAMEREADYSTATUSRESTARTSAGEelasticsearch-master-77d5d6c9db-xt5kq1/1Running067s
2.2、部署es data节点配置清单如下(es-data.yaml):
---apiVersion: v1kind: ConfigMapmetadata:namespace: elasticname: elasticsearch-data-configlabels:app: elasticsearchrole: datadata:elasticsearch.yml: |-cluster.name: ${CLUSTER_NAME}node.name: ${NODE_NAME}discovery.seed_hosts: ${NODE_LIST}cluster.initial_master_nodes: ${MASTER_NODES}network.host: 0.0.0.0node:master: falsedata: trueingest: falsexpack.security.enabled: truexpack.monitoring.collection.enabled: truexpack.security.transport.ssl.enabled: truexpack.security.transport.ssl.verification_mode: certificatexpack.security.transport.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12xpack.security.transport.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12xpack.ml.enabled: truexpack.license.self_generated.type: basicxpack.monitoring.exporters.my_local:type: localuse_ingest: false---apiVersion: v1kind: Servicemetadata:namespace: elasticname: elasticsearch-datalabels:app: elasticsearchrole: dataspec:ports:- port: 9300name: transportselector:app: elasticsearchrole: data---apiVersion: apps/v1kind: StatefulSetmetadata:namespace: elasticname: elasticsearch-datalabels:app: elasticsearchrole: dataspec:serviceName: "elasticsearch-data"selector:matchLabels:app: elasticsearchrole: datatemplate:metadata:labels:app: elasticsearchrole: dataspec:initContainers:- name: init-sysctlimage: busybox:1.27.2command:- sysctl- -w- vm.max_map_count=262144securityContext:privileged: truecontainers:- name: elasticsearch-dataimage: docker.elastic.co/elasticsearch/elasticsearch:7.8.0env:- name: CLUSTER_NAMEvalue: elasticsearch- name: NODE_NAMEvalue: elasticsearch-data- name: NODE_LISTvalue: elasticsearch-master,elasticsearch-data,elasticsearch-client- name: MASTER_NODESvalue: elasticsearch-master- name: "ES_JAVA_OPTS"value: "-Xms1024m -Xmx1024m"ports:- containerPort: 9300name: transportvolumeMounts:- name: configmountPath: /usr/share/elasticsearch/config/elasticsearch.ymlreadOnly: truesubPath: elasticsearch.yml- name: elasticsearch-data-persistent-storagemountPath: /data/db- name: keystoremountPath: /usr/share/elasticsearch/config/certs/elastic-certificates.p12readOnly: truesubPath: elastic-certificates.p12volumes:- name: configconfigMap:name: elasticsearch-data-config- name: keystoresecret:secretName: elastic-certificatesdefaultMode: 044volumeClaimTemplates:- metadata:name: elasticsearch-data-persistent-storagespec:accessModes: [ "ReadWriteOnce" ]storageClassName: managed-nfs-storageresources:requests:storage: 20Gi---
执行kubectl apply -f es-data.yaml创建配置清单 , 其状态变为running即为部署成功 。
# kubectl get pod -n elasticNAMEREADYSTATUSRESTARTSAGEelasticsearch-data-01/1Running04selasticsearch-master-77d5d6c9db-gklgd1/1Running02m35selasticsearch-master-77d5d6c9db-gvhcb1/1Running02m35selasticsearch-master-77d5d6c9db-pflz61/1Running02m35s
- kubeadm部署单master节点
- 银河之光 希捷Exos x18企业级硬盘评测
- kubernetes-Prometheus基于邮件告警
- helm3部署milvus集群部署
- Jenkins发布PHP项目之一自动化部署
- Kubernetes任务调用Job与CronJob及源码分析
- 华为高管:5G网络部署初期,用户体验差
- 5000GB写入测试!影驰擎GA-E评测:只卖19999元的16TB企业级SSD
- 5G小基站沙龙 | 小基站将迎来规模化部署,凌华科技助力5G赋能千行百业
- IT168企业级|合作共赢!卓宝科技牵手鑫明光建筑科技开启战略合作新征程