Example for using taint and tolerance - Kubernetes

0 votes
Can you give an example for using taints and tolerance(a deployment yaml file)? Thank you
Jun 27 in Kubernetes by Tara
40 views

1 answer to this question.

0 votes

Hey @Tara, this is how you use taints and tolerance in yaml:

apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: dd-agent
spec:
  template:
    metadata:
      labels:
        app: dd-agent
      name: dd-agent
    spec:
      tolerations: 
      - key: node-role.kubernetes.io/master
        effect: NoSchedule
      containers:
      - image: datadog/docker-dd-agent:latest
        imagePullPolicy: Always
        name: dd-agent
        ports:
          - containerPort: 8125
            name: dogstatsdport
            protocol: UDP
        env:
          - name: API_KEY
            value: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaaaaaaaaa
          - name: KUBERNETES
            value: "yes"
          - name: SD_BACKEND
            value: docker
        resources:
          requests:
            memory: "128Mi"
            cpu: "100m"
          limits:
            memory: "512Mi"
            cpu: "250m"
        volumeMounts:
          - name: dockersocket
            mountPath: /var/run/docker.sock
          - name: procdir
            mountPath: /host/proc
            readOnly: true
          - name: cgroups
            mountPath: /host/sys/fs/cgroup
            readOnly: true
      volumes:
        - hostPath:
            path: /var/run/docker.sock
          name: dockersocket
        - hostPath:
            path: /proc
          name: procdir
        - hostPath:
            path: /sys/fs/cgroup
          name: cgroups
answered Jun 27 by Faiza

Related Questions In Kubernetes

0 votes
1 answer

kubernetes ingress controller and resource using nginx

Ingress is just collection of rules that forwards ...READ MORE

answered Sep 12, 2018 in Kubernetes by Kalgi
• 42,330 points
330 views
0 votes
1 answer
0 votes
1 answer

automating cluster setup and app deplument on kubernetes

Go through Google Cloud Deployment Manager. it automates ...READ MORE

answered Jul 5, 2018 in Kubernetes by ajs3033
• 7,280 points
51 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
2,989 views
+3 votes
1 answer
0 votes
1 answer

Taint and tolerance in Kubernetes 1.6

Hey @Greg, Taint can be considered as ...READ MORE

answered Jun 27 in Kubernetes by Yamini
48 views
0 votes
2 answers

single point of entry for multiple services in kubernetes ingress

I tried having something similar too. Deployment apiVersion: extensions/v1beta1 kind: ...READ MORE

answered Sep 7, 2018 in Kubernetes by Hannah
• 16,300 points
124 views