apiVersion: apps/v1
kind: Deployment
metadata:
  name: elasticsearch-deployment
  namespace: kube-system
spec:
  selector:
    matchLabels:
      app: elasticsearch
  template:
    metadata:
      labels:
        app: elasticsearch
    spec:
      containers:
      - name: at-elasticsearch
        image: docker.elastic.co/elasticsearch/elasticsearch:7.0.1
        volumeMounts:
          - name: elasticsearch-data
            mountPath: /usr/share/elasticsearch/data
        env:
          - name: discovery.type
            value: "single-node"
          - name: cluster.name
            value: "airTeam"
        ports:
        - containerPort: 9200
      volumes:
        - name: elasticsearch-data