Sign inSign up

emacski/k8s-elasticsearch

By emacski

Updated almost 8 years ago

DEPRECATED Alternative kubernetes elasticsearch image

Image
1

3.1K

emacski/k8s-elasticsearch repository overview

DEPRECATED

This project is obsolete and no longer maintained. Refer to https://kubernetes.io/docs/home/ for kubernetes logging configuration.

Kubernetes Elasticsearch

Alternative elasticsearch docker image designed as a drop-in replacement for the es-image in the fluentd-elasticsearch cluster-level logging addon.

Components
NameVersion
elasticsearch6.4.2
Required Configuration Environment Variables
NameDescription
k8s_namespaceThe k8s namespace of the elasticsearch cluster
k8s_serviceThe k8s service of the elasticsearch cluster
Configuration Environment Variables

Uses ReDACT for elasticsearch configuration.

NameDescription
es_cluster_nameThe name of the elasticsearch cluster (Default: kubernetes-logging)
es_node_nameThe name of the elasticsearch node (Default: $HOSTNAME)
es_node_masterWhether or not this node is eligible to be a master node (Default: true)
es_node_dataWhether or not this node is eligible to be a data node (Default: true)
es_transport_portThe elasticsearch transport port (Default: 9300)
es_http_portThe elasticsearch http port (Default: 9200)
es_min_master_nodesThe minimum number of master nodes (Default: 2)
Special Configuration Environment Variables

These configuration directives are automatically resolved using ReDACT and the k8s-app-config helper utility

NameDescription
es_hostsThe elasticsearch hosts in the cluster, used for discovery (Default: empty)
Example ReplicaSet Deployment and Service
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: elasticsearch-logging-v1
  namespace: kube-system
  labels:
    k8s-app: elasticsearch-logging
    version: v1
spec:
  replicas: 2
  selector:
    matchLabels:
      k8s-app: elasticsearch-logging
      version: v1
  template:
    metadata:
      labels:
        k8s-app: elasticsearch-logging
        version: v1
    spec:
      containers:
      - image: emacski/k8s-elasticsearch:latest
        name: elasticsearch-logging
        resources:
          # need more cpu upon initialization, therefore burstable class
          limits:
            cpu: 1000m
          requests:
            cpu: 100m
        ports:
        - containerPort: 9200
          name: db
          protocol: TCP
        - containerPort: 9300
          name: transport
          protocol: TCP
        volumeMounts:
        - name: es-persistent-storage
          mountPath: /data
        env:
        - name: "k8s_namespace"
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: "k8s_service"
          value: "elasticsearch-logging"
      volumes:
      - name: es-persistent-storage
        emptyDir: {}

---

apiVersion: v1
kind: Service
metadata:
  name: elasticsearch-logging
  namespace: kube-system
  labels:
    k8s-app: elasticsearch-logging
    kubernetes.io/name: "Elasticsearch"
    kubernetes.io/cluster-service: "true"
spec:
  ports:
  - port: 9200
    protocol: TCP
    targetPort: db
  selector:
    k8s-app: elasticsearch-logging

Tag summary

Content type

Image

Digest

Size

177.7 MB

Last updated

almost 8 years ago

docker pull emacski/k8s-elasticsearch