Skip to content

Instantly share code, notes, and snippets.

@Thakurvaibhav
Created October 21, 2018 07:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thakurvaibhav/59dabad89c1e0e45f3aa55181339b456 to your computer and use it in GitHub Desktop.
Save Thakurvaibhav/59dabad89c1e0e45f3aa55181339b456 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Namespace
metadata:
name: elasticsearch
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: es-hq
namespace: elasticsearch
labels:
component: elasticsearch
role: hq
spec:
replicas: 1
template:
metadata:
labels:
component: elasticsearch
role: hq
spec:
containers:
- name: es-hq
image: elastichq/elasticsearch-hq:release-v3.4.0
env:
- name: HQ_DEFAULT_URL
value: http://elasticsearch:9200
resources:
limits:
cpu: 0.5
ports:
- containerPort: 5000
name: http
---
apiVersion: v1
kind: Service
metadata:
name: hq
annotations:
cloud.google.com/load-balancer-type: "Internal"
namespace: elasticsearch
labels:
component: elasticsearch
role: hq
spec:
selector:
component: elasticsearch
role: hq
ports:
- name: http
port: 80
targetPort: 5000
protocol: TCP
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment