Created
June 12, 2018 15:34
-
-
Save bketelsen/d53a57d669555c399ab618952d8a83d0 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: ServiceAccount | |
metadata: | |
name: fluentd | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRole | |
metadata: | |
name: fluentd | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- pods | |
- namespaces | |
verbs: | |
- get | |
- list | |
- watch | |
--- | |
kind: ClusterRoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
name: fluentd | |
roleRef: | |
kind: ClusterRole | |
name: fluentd | |
apiGroup: rbac.authorization.k8s.io | |
subjects: | |
- kind: ServiceAccount | |
name: fluentd | |
namespace: default | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: fluentd | |
labels: | |
k8s-app: fluentd-logging | |
version: v1 | |
kubernetes.io/cluster-service: "true" | |
spec: | |
template: | |
metadata: | |
labels: | |
k8s-app: fluentd-logging | |
version: v1 | |
kubernetes.io/cluster-service: "true" | |
spec: | |
serviceAccount: fluentd | |
serviceAccountName: fluentd | |
tolerations: | |
- key: node-role.kubernetes.io/master | |
effect: NoSchedule | |
containers: | |
- name: fluentd | |
image: fluent/fluentd-kubernetes-daemonset:elasticsearch | |
env: | |
- name: FLUENT_ELASTICSEARCH_HOST | |
value: "elasticsearch" | |
- name: FLUENT_ELASTICSEARCH_PORT | |
value: "9200" | |
- name: FLUENT_ELASTICSEARCH_SCHEME | |
value: "http" | |
# X-Pack Authentication | |
# ===================== | |
- name: FLUENT_ELASTICSEARCH_USER | |
value: "elastic" | |
- name: FLUENT_ELASTICSEARCH_PASSWORD | |
value: "changeme" | |
resources: | |
limits: | |
memory: 200Mi | |
requests: | |
cpu: 100m | |
memory: 200Mi | |
volumeMounts: | |
- name: varlog | |
mountPath: /var/log | |
- name: varlibdockercontainers | |
mountPath: /var/lib/docker/containers | |
readOnly: true | |
terminationGracePeriodSeconds: 30 | |
volumes: | |
- name: varlog | |
hostPath: | |
path: /var/log | |
- name: varlibdockercontainers | |
hostPath: | |
path: /var/lib/docker/containers | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
annotations: | |
deployment.kubernetes.io/revision: "1" | |
creationTimestamp: null | |
generation: 1 | |
labels: | |
run: elasticsearch | |
name: elasticsearch | |
selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/elasticsearch | |
spec: | |
progressDeadlineSeconds: 600 | |
replicas: 1 | |
revisionHistoryLimit: 10 | |
selector: | |
matchLabels: | |
run: elasticsearch | |
strategy: | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 1 | |
type: RollingUpdate | |
template: | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: elasticsearch | |
spec: | |
containers: | |
- image: elasticsearch:5.6.8 | |
imagePullPolicy: IfNotPresent | |
name: elasticsearch | |
env: | |
- name: ES_JAVA_OPTS | |
value: "-Xms256m -Xmx256m" | |
resources: {} | |
terminationMessagePath: /dev/termination-log | |
terminationMessagePolicy: File | |
dnsPolicy: ClusterFirst | |
restartPolicy: Always | |
schedulerName: default-scheduler | |
securityContext: {} | |
terminationGracePeriodSeconds: 30 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: elasticsearch | |
name: elasticsearch | |
selfLink: /api/v1/namespaces/default/services/elasticsearch | |
spec: | |
ports: | |
- port: 9200 | |
protocol: TCP | |
targetPort: 9200 | |
selector: | |
run: elasticsearch | |
sessionAffinity: None | |
type: ClusterIP | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
annotations: | |
deployment.kubernetes.io/revision: "1" | |
creationTimestamp: null | |
generation: 1 | |
labels: | |
run: kibana | |
name: kibana | |
selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/kibana | |
spec: | |
progressDeadlineSeconds: 600 | |
replicas: 1 | |
revisionHistoryLimit: 10 | |
selector: | |
matchLabels: | |
run: kibana | |
strategy: | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 1 | |
type: RollingUpdate | |
template: | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: kibana | |
spec: | |
containers: | |
- env: | |
- name: ELASTICSEARCH_URL | |
value: http://elasticsearch:9200/ | |
image: kibana:5.6.8 | |
imagePullPolicy: Always | |
name: kibana | |
resources: {} | |
terminationMessagePath: /dev/termination-log | |
terminationMessagePolicy: File | |
dnsPolicy: ClusterFirst | |
restartPolicy: Always | |
schedulerName: default-scheduler | |
securityContext: {} | |
terminationGracePeriodSeconds: 30 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: kibana | |
name: kibana | |
selfLink: /api/v1/namespaces/default/services/kibana | |
spec: | |
externalTrafficPolicy: Cluster | |
ports: | |
- port: 5601 | |
protocol: TCP | |
targetPort: 5601 | |
selector: | |
run: kibana | |
sessionAffinity: None | |
type: NodePort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment