Skip to content

Instantly share code, notes, and snippets.

@arslanbekov
Created January 5, 2019 09:06
Show Gist options
  • Save arslanbekov/0177c452be92a55611997904a61cdc5e to your computer and use it in GitHub Desktop.
Save arslanbekov/0177c452be92a55611997904a61cdc5e to your computer and use it in GitHub Desktop.
Example DS from https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ with change resource values and priorityClassName
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: fluentd-elasticsearch
namespace: kube-system
labels:
k8s-app: fluentd-logging
spec:
selector:
matchLabels:
name: fluentd-elasticsearch
template:
metadata:
labels:
name: fluentd-elasticsearch
spec:
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
containers:
- name: fluentd-elasticsearch
image: k8s.gcr.io/fluentd-elasticsearch:1.20
resources:
limits:
memory: 1Gi
requests:
cpu: 2
memory: 3Gi
volumeMounts:
- name: varlog
mountPath: /var/log
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
priorityClassName: system-node-critical
terminationGracePeriodSeconds: 30
volumes:
- name: varlog
hostPath:
path: /var/log
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment