1
- # kindnetd networking manifest
1
+ # source: https://github.com/kubernetes-sigs/kind/blob/v0.27.0/pkg/build/nodeimage/const_cni.go#L28
2
2
---
3
3
kind : ClusterRole
4
4
apiVersion : rbac.authorization.k8s.io/v1
5
5
metadata :
6
6
name : kindnet
7
7
rules :
8
+ - apiGroups :
9
+ - policy
10
+ resources :
11
+ - podsecuritypolicies
12
+ verbs :
13
+ - use
14
+ resourceNames :
15
+ - kindnet
8
16
- apiGroups :
9
17
- " "
10
18
resources :
11
19
- nodes
20
+ - pods
21
+ - namespaces
12
22
verbs :
13
23
- list
14
24
- watch
15
- - patch
16
25
- apiGroups :
17
- - " "
26
+ - " networking.k8s.io "
18
27
resources :
19
- - configmaps
28
+ - networkpolicies
20
29
verbs :
21
- - get
30
+ - list
31
+ - watch
22
32
---
23
33
kind : ClusterRoleBinding
24
34
apiVersion : rbac.authorization.k8s.io/v1
@@ -29,9 +39,9 @@ roleRef:
29
39
kind : ClusterRole
30
40
name : kindnet
31
41
subjects :
32
- - kind : ServiceAccount
33
- name : kindnet
34
- namespace : kube-system
42
+ - kind : ServiceAccount
43
+ name : kindnet
44
+ namespace : kube-system
35
45
---
36
46
apiVersion : v1
37
47
kind : ServiceAccount
@@ -60,55 +70,52 @@ spec:
60
70
k8s-app : kindnet
61
71
spec :
62
72
hostNetwork : true
73
+ nodeSelector :
74
+ kubernetes.io/os : linux
63
75
tolerations :
64
- - operator : Exists
65
- effect : NoSchedule
76
+ - operator : Exists
66
77
serviceAccountName : kindnet
67
78
containers :
68
- - name : kindnet-cni
69
- image : kindest/kindnetd:v20230511-dc714da8
70
- env :
71
- - name : HOST_IP
72
- valueFrom :
73
- fieldRef :
74
- fieldPath : status.hostIP
75
- - name : POD_IP
76
- valueFrom :
77
- fieldRef :
78
- fieldPath : status.podIP
79
- # We're using the dualstack CIDRs here. The order doesn't matter for kindnet as the loops are run concurrently.
80
- # REF: https://github.com/kubernetes-sigs/kind/blob/3dbeb894e3092a336ab4278d3823e73a1d66aff7/images/kindnetd/cmd/kindnetd/main.go#L149-L175
81
- - name : POD_SUBNET
82
- value : ' ${DOCKER_POD_CIDRS},${DOCKER_POD_IPV6_CIDRS}'
83
- volumeMounts :
84
- - name : cni-cfg
85
- mountPath : /etc/cni/net.d
86
- - name : xtables-lock
87
- mountPath : /run/xtables.lock
88
- readOnly : false
89
- - name : lib-modules
90
- mountPath : /lib/modules
91
- readOnly : true
92
- resources :
93
- requests :
94
- cpu : " 100m"
95
- memory : " 50Mi"
96
- limits :
97
- cpu : " 100m"
98
- memory : " 50Mi"
99
- securityContext :
100
- privileged : false
101
- capabilities :
102
- add : ["NET_RAW", "NET_ADMIN"]
79
+ - name : kindnet-cni
80
+ # Needs to be kept in sync with DOCKER_PRELOAD_IMAGES in test/e2e/config/docker.yaml for caching purposes.
81
+ image : kindest/kindnetd:v20250214-acbabc1a
82
+ env :
83
+ - name : HOST_IP
84
+ valueFrom :
85
+ fieldRef :
86
+ fieldPath : status.hostIP
87
+ - name : POD_IP
88
+ valueFrom :
89
+ fieldRef :
90
+ fieldPath : status.podIP
91
+ # We're using the dualstack CIDRs here. The order doesn't matter for kindnet as the loops are run concurrently.
92
+ # REF: https://github.com/kubernetes-sigs/kind/blob/3dbeb894e3092a336ab4278d3823e73a1d66aff7/images/kindnetd/cmd/kindnetd/main.go#L149-L175
93
+ - name : POD_SUBNET
94
+ value : ' ${DOCKER_POD_CIDRS},${DOCKER_POD_IPV6_CIDRS}'
95
+ volumeMounts :
96
+ - name : cni-cfg
97
+ mountPath : /etc/cni/net.d
98
+ - name : xtables-lock
99
+ mountPath : /run/xtables.lock
100
+ readOnly : false
101
+ - name : lib-modules
102
+ mountPath : /lib/modules
103
+ readOnly : true
104
+ resources :
105
+ requests :
106
+ cpu : " 100m"
107
+ memory : " 50Mi"
108
+ limits :
109
+ cpu : " 100m"
110
+ memory : " 50Mi"
111
+ securityContext :
112
+ privileged : false
113
+ capabilities :
114
+ add : ["NET_RAW", "NET_ADMIN"]
103
115
volumes :
104
- - name : cni-bin
105
- hostPath :
106
- path : /opt/cni/bin
107
- type : DirectoryOrCreate
108
116
- name : cni-cfg
109
117
hostPath :
110
118
path : /etc/cni/net.d
111
- type : DirectoryOrCreate
112
119
- name : xtables-lock
113
120
hostPath :
114
121
path : /run/xtables.lock
0 commit comments