Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 515 Bytes

File metadata and controls

36 lines (28 loc) · 515 Bytes
  1. Add a taint to node and generate manifest for the pod


k taint node --help

k taint node -l work_type=redis  app_type=alpha:NoSchedule

k run alpha --image redis --dry-run=client -o yaml > 9.yaml
  1. Add tolerations to pod
# vim 9.yaml

apiVersion: v1
kind: Pod
metadata:
  labels:
    run: alpha
  name: alpha
spec:
  containers:
  - image: redis
    name: alpha
  tolerations:
  - key: "app_type"
    operator: "Equal"
    value: "alpha"
    effect: "NoSchedule"
k apply -f 9.yaml