apiVersion: extensions/v1beta1 kind: Deployment metadata: name: logstash-test namespace: default spec: replicas: 3 template: metadata: labels: k8s-app: logstash-test spec: containers: - image: sz-pg-oam-docker-hub-001.tendcloud.com/library/logstash:5.3.0 name: logstash resources: requests: cpu: 100m memory: 500M volumeMounts: - name: app-logs mountPath: /log env: - name: LogFile value: '["/log/*","/log/usermange/common/*"]' - name: ES_SERVER value: 172.23.5.255:9200 - name: INDICES value: logstash-docker - name: CODEC value: plain - image: sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_8 name : app ports: - containerPort: 80 volumeMounts: - name: app-logs mountPath: /usr/local/TalkingData/logs volumes: - name: app-logs emptyDir: {} --- apiVersion: v1 kind: Service metadata: name: logstash-test labels: app: logstash-test spec: ports: - port: 80 protocol: TCP name: http selector: run: logstash-test