Created
September 13, 2017 15:46
-
-
Save rootfs/88a001cc5d3e88aa70689650efe98321 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: elasticsearch-logging | |
| labels: | |
| k8s-addon: logging-elasticsearch.addons.k8s.io | |
| k8s-app: elasticsearch-logging | |
| kubernetes.io/cluster-service: "true" | |
| kubernetes.io/name: "Elasticsearch" | |
| spec: | |
| ports: | |
| - port: 9200 | |
| protocol: TCP | |
| targetPort: db | |
| selector: | |
| k8s-app: elasticsearch-logging | |
| --- | |
| apiVersion: apps/v1beta1 | |
| kind: StatefulSet | |
| metadata: | |
| name: elasticsearch-logging | |
| labels: | |
| k8s-addon: logging-elasticsearch.addons.k8s.io | |
| k8s-app: elasticsearch-logging | |
| version: v1 | |
| kubernetes.io/cluster-service: "true" | |
| spec: | |
| serviceName: elasticsearch-logging | |
| replicas: 2 | |
| template: | |
| metadata: | |
| labels: | |
| k8s-app: elasticsearch-logging | |
| version: v1 | |
| kubernetes.io/cluster-service: "true" | |
| spec: | |
| containers: | |
| - image: gcr.io/google_containers/elasticsearch:v2.4.1-2 | |
| 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: "NAMESPACE" | |
| valueFrom: | |
| fieldRef: | |
| fieldPath: metadata.namespace | |
| volumes: | |
| - name: es-persistent-storage | |
| emptyDir: {} | |
| --- | |
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: kibana-logging | |
| labels: | |
| k8s-addon: logging-elasticsearch.addons.k8s.io | |
| k8s-app: kibana-logging | |
| kubernetes.io/cluster-service: "true" | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| k8s-app: kibana-logging | |
| template: | |
| metadata: | |
| labels: | |
| k8s-app: kibana-logging | |
| spec: | |
| containers: | |
| - name: kibana-logging | |
| image: gcr.io/google_containers/kibana:v4.6.1-1 | |
| resources: | |
| # keep request = limit to keep this container in guaranteed | |
| # class | |
| limits: | |
| cpu: 100m | |
| requests: | |
| cpu: 100m | |
| env: | |
| - name: "ELASTICSEARCH_URL" | |
| value: "http://elasticsearch-logging:9200" | |
| - name: "KIBANA_BASE_URL" | |
| value: | |
| "/api/v1/proxy/namespaces/default/services/kibana-logging" | |
| ports: | |
| - containerPort: 5601 | |
| name: ui | |
| protocol: TCP | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: kibana-logging | |
| labels: | |
| k8s-addon: logging-elasticsearch.addons.k8s.io | |
| k8s-app: kibana-logging | |
| kubernetes.io/cluster-service: "true" | |
| kubernetes.io/name: "Kibana" | |
| spec: | |
| ports: | |
| - port: 5601 | |
| protocol: TCP | |
| targetPort: ui | |
| selector: | |
| k8s-app: kibana-logging |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment