Skip to content

Instantly share code, notes, and snippets.

@anfernee
Created November 11, 2022 05:56
Show Gist options
  • Save anfernee/3dff046ff927a35a49e22ae816b0388f to your computer and use it in GitHub Desktop.
Save anfernee/3dff046ff927a35a49e22ae816b0388f to your computer and use it in GitHub Desktop.
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kindnet
namespace: kube-system
labels:
tier: node
app: kindnet
k8s-app: kindnet
spec:
selector:
matchLabels:
app: kindnet
template:
metadata:
labels:
tier: node
app: kindnet
k8s-app: kindnet
spec:
hostNetwork: true
tolerations:
- operator: Exists
serviceAccountName: kindnet
containers:
- name: kindnet-cni
image: docker.io/kindest/kindnetd:v20220510-4929dd75
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: POD_SUBNET
value: {{ .PodSubnet }}
volumeMounts:
- name: cni-cfg
mountPath: /etc/cni/net.d
- name: xtables-lock
mountPath: /run/xtables.lock
readOnly: false
- name: lib-modules
mountPath: /lib/modules
readOnly: true
resources:
requests:
cpu: "100m"
memory: "50Mi"
limits:
cpu: "100m"
memory: "50Mi"
securityContext:
privileged: false
capabilities:
add: ["NET_RAW", "NET_ADMIN"]
volumes:
- name: cni-cfg
hostPath:
path: /etc/cni/net.d
- name: xtables-lock
hostPath:
path: /run/xtables.lock
type: FileOrCreate
- name: lib-modules
hostPath:
path: /lib/modules
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment