text stringlengths 0 59.1k |
|---|
spec: |
replicas: 1 |
template: |
metadata: |
labels: |
component: elasticsearch |
spec: |
serviceAccount: elasticsearch |
initContainers: |
- name: init-sysctl |
image: busybox |
imagePullPolicy: IfNotPresent |
command: ["sysctl", "-w", "vm.max_map_count=262144"] |
securityContext: |
privileged: true |
containers: |
- name: es |
securityContext: |
capabilities: |
add: |
- IPC_LOCK |
image: quay.io/pires/docker-elasticsearch-kubernetes:5.6.2 |
env: |
- name: KUBERNETES_CA_CERTIFICATE_FILE |
value: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt |
- name: NAMESPACE |
valueFrom: |
fieldRef: |
fieldPath: metadata.namespace |
- name: "CLUSTER_NAME" |
value: "myesdb" |
- name: "DISCOVERY_SERVICE" |
value: "elasticsearch" |
- name: NODE_MASTER |
value: "true" |
- name: NODE_DATA |
value: "true" |
- name: HTTP_ENABLE |
value: "true" |
ports: |
- containerPort: 9200 |
name: http |
protocol: TCP |
- containerPort: 9300 |
name: transport |
protocol: TCP |
volumeMounts: |
- mountPath: /data |
name: storage |
volumes: |
- name: storage |
emptyDir: {} |
<|endoftext|> |
# source: k8s_examples/_archived/elasticsearch/rbac.yaml type: yaml |
--- |
apiVersion: rbac.authorization.k8s.io/v1 |
kind: Role |
metadata: |
name: elasticsearch |
rules: |
- apiGroups: |
- "" |
resources: |
- endpoints |
verbs: |
- get |
--- |
apiVersion: rbac.authorization.k8s.io/v1 |
kind: RoleBinding |
metadata: |
name: elasticsearch |
roleRef: |
apiGroup: rbac.authorization.k8s.io |
kind: Role |
name: elasticsearch |
subjects: |
- kind: ServiceAccount |
name: elasticsearch |
namespace: default |
<|endoftext|> |
# source: k8s_examples/_archived/elasticsearch/README.md type: docs |
# Elasticsearch for Kubernetes |
Kubernetes makes it trivial for anyone to easily build and scale [Elasticsearch](http://www.elasticsearch.org/) clusters. Here, you'll find how to do so. |
Current Elasticsearch version is `5.6.2`. |
[A more robust example that follows Elasticsearch best-practices of separating nodes concern is also available](production_cluster/README.md). |
Current pod descriptors use an `emptyDir` for storing data in each data node container. This is meant to be for the sake of simplicity and [should be adapted according to your storage needs](https://kubernetes.io/docs/concepts/storage/persistent-volumes/). |
## Docker image |
The [pre-built image](https://github.com/pires/docker-elasticsearch-kubernetes) used in this example will not be supported. Feel free to fork to fit your own needs, but keep in mind that you will need to change Kubernetes descriptors accordingly. |
## Deploy |
Let's kickstart our cluster with 1 instance of Elasticsearch. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.