-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcni-daemonset.yaml
41 lines (41 loc) · 1.11 KB
/
cni-daemonset.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: demystifying-cni
namespace: kube-system
spec:
selector:
matchLabels:
app: demystifying-cni
template:
metadata:
labels:
app: demystifying-cni
spec:
# running in hostNetwork avoids dependency on CNI (solve chicken-egg problem)
hostNetwork: true
tolerations:
# ensure to schedule on nodes that are not ready (nodes without a CNI are not ready)
- key: node.kubernetes.io/not-ready
operator: Exists
effect: NoSchedule
# ensure to schedule on control-plane nodes
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
containers:
- name: demystifying-cni
image: demystifying-cni:0.0.1
volumeMounts:
- name: netd
mountPath: /etc/cni/net.d
- name: cnibin
mountPath: /opt/cni/bin
# use hostPath to get access to the node filesystem
volumes:
- name: netd
hostPath:
path: /etc/cni/net.d
- name: cnibin
hostPath:
path: /opt/cni/bin