diff --git a/es-data.yaml b/es-data.yaml index 27a1db0..1698948 100644 --- a/es-data.yaml +++ b/es-data.yaml @@ -52,6 +52,8 @@ spec: limits: cpu: 1 ports: + - containerPort: 9200 + name: http - containerPort: 9300 name: transport livenessProbe: @@ -59,6 +61,12 @@ spec: port: transport initialDelaySeconds: 20 periodSeconds: 10 + readinessProbe: + httpGet: + path: /_cluster/health + port: http + initialDelaySeconds: 20 + timeoutSeconds: 5 volumeMounts: - name: storage mountPath: /data diff --git a/es-ingest-svc.yaml b/es-ingest-svc.yaml new file mode 100644 index 0000000..f9f264a --- /dev/null +++ b/es-ingest-svc.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: elasticsearch-ingest + labels: + component: elasticsearch + role: ingest +spec: + selector: + component: elasticsearch + role: ingest + ports: + - name: http + port: 9200 +#type: LoadBalancer diff --git a/es-client.yaml b/es-ingest.yaml similarity index 95% rename from es-client.yaml rename to es-ingest.yaml index 3a499e6..820dd79 100644 --- a/es-client.yaml +++ b/es-ingest.yaml @@ -1,17 +1,17 @@ apiVersion: apps/v1beta1 kind: Deployment metadata: - name: es-client + name: es-ingest labels: component: elasticsearch - role: client + role: ingest spec: replicas: 2 template: metadata: labels: component: elasticsearch - role: client + role: ingest spec: initContainers: - name: init-sysctl @@ -23,7 +23,7 @@ spec: securityContext: privileged: true containers: - - name: es-client + - name: es-ingest image: quay.io/pires/docker-elasticsearch-kubernetes:6.2.4 env: - name: NAMESPACE diff --git a/es-svc.yaml b/es-svc.yaml index a83682b..d765c01 100644 --- a/es-svc.yaml +++ b/es-svc.yaml @@ -4,11 +4,11 @@ metadata: name: elasticsearch labels: component: elasticsearch - role: client + role: data spec: selector: component: elasticsearch - role: client + role: data ports: - name: http port: 9200 diff --git a/stateful/es-data-stateful.yaml b/stateful/es-data-stateful.yaml index 4e199bf..b73b053 100644 --- a/stateful/es-data-stateful.yaml +++ b/stateful/es-data-stateful.yaml @@ -53,6 +53,8 @@ spec: limits: cpu: 1 ports: + - containerPort: 9200 + name: http - containerPort: 9300 name: transport livenessProbe: @@ -60,6 +62,12 @@ spec: port: transport initialDelaySeconds: 20 periodSeconds: 10 + readinessProbe: + httpGet: + path: /_cluster/health + port: http + initialDelaySeconds: 20 + timeoutSeconds: 5 volumeMounts: - name: storage mountPath: /data