Elastic Cloud On K8S ECK
K8S 部署安装Elastic Cloud 服务
文件信息
安装crds
安装operator
kubectl apply -f 002.operator.yaml
查看operator日志
kubectl -n elastic-system logs -f statefulset.apps/elastic-operator
使用ECK部署ES
apiVersion : elasticsearch.k8s.elastic.co/v1
kind : Elasticsearch
metadata :
name : lit
namespace : elastic- system
spec :
version : 8.3.3
image : docker.elastic.co/elasticsearch/elasticsearch: 8.3.3
auth :
fileRealm :
- secretName : kubesphere- elasticsearch- realm- secret
http :
tls :
selfSignedCertificate :
disabled : true
nodeSets :
- name : lit
count : 3
config :
node.store.allow_mmap : false
volumeClaimTemplates :
- metadata :
name : elasticsearch- data
spec :
accessModes :
- ReadWriteOnce
resources :
requests :
storage : 10Gi
storageClassName : alicloud- nas
[ root@Master 002.ElasticCloud]
cat << EOF | kubectl apply -f -
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: lit-eck
spec:
version: 8.3.3
nodeSets:
- name: default
count: 3
config:
node.store.allow_mmap: false
EOF
[ root@Master 002.ElasticCloud]
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: lit
namespace: elastic-system
spec:
version: 8.3 .3
image: docker.elastic.co/elasticsearch/elasticsearch:8.3.3
auth:
fileRealm:
- secretName: kubesphere-elasticsearch-realm-secret
http:
tls:
selfSignedCertificate:
disabled: true
nodeSets:
- name: lit
count: 3
config:
node.store.allow_mmap: false
volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: alicloud-nas
获取yaml文件
apiVersion : apps/v1
kind : StatefulSet
metadata :
creationTimestamp : "2022-08-10T02:34:08Z"
generation : 1
labels :
common.k8s.elastic.co/template-hash : "2038917924"
common.k8s.elastic.co/type : elasticsearch
elasticsearch.k8s.elastic.co/cluster-name : lit
elasticsearch.k8s.elastic.co/statefulset-name : lit- es- lit
name : lit- es- lit
namespace : elastic- system
ownerReferences :
- apiVersion : elasticsearch.k8s.elastic.co/v1
blockOwnerDeletion : true
controller : true
kind : Elasticsearch
name : lit
uid : 47379a1b- ddcb- 4552- 9909- 0e4253441691
resourceVersion : "41911788"
uid : e166e637- d67a- 4a97- 9aed- 02dd0754da38
spec :
podManagementPolicy : Parallel
replicas : 3
revisionHistoryLimit : 10
selector :
matchLabels :
common.k8s.elastic.co/type : elasticsearch
elasticsearch.k8s.elastic.co/cluster-name : lit
elasticsearch.k8s.elastic.co/statefulset-name : lit- es- lit
serviceName : lit- es- lit
template :
metadata :
annotations :
co.elastic.logs/module : elasticsearch
elasticsearch.k8s.elastic.co/config-hash : "3117001397"
creationTimestamp : null
labels :
common.k8s.elastic.co/type : elasticsearch
elasticsearch.k8s.elastic.co/cluster-name : lit
elasticsearch.k8s.elastic.co/http-scheme : http
elasticsearch.k8s.elastic.co/node-data : "true"
elasticsearch.k8s.elastic.co/node-data_cold : "true"
elasticsearch.k8s.elastic.co/node-data_content : "true"
elasticsearch.k8s.elastic.co/node-data_frozen : "true"
elasticsearch.k8s.elastic.co/node-data_hot : "true"
elasticsearch.k8s.elastic.co/node-data_warm : "true"
elasticsearch.k8s.elastic.co/node-ingest : "true"
elasticsearch.k8s.elastic.co/node-master : "true"
elasticsearch.k8s.elastic.co/node-ml : "true"
elasticsearch.k8s.elastic.co/node-remote_cluster_client : "true"
elasticsearch.k8s.elastic.co/node-transform : "true"
elasticsearch.k8s.elastic.co/node-voting_only : "false"
elasticsearch.k8s.elastic.co/statefulset-name : lit- es- lit
elasticsearch.k8s.elastic.co/version : 8.3.3
spec :
affinity :
podAntiAffinity :