Created
August 17, 2020 00:15
-
-
Save moondev/651c2c1d8e360c11254c7a4c176c125a to your computer and use it in GitHub Desktop.
kindnet.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# kindnetd networking manifest | |
# would you kindly template this file | |
--- | |
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: kindnet | |
rules: | |
- apiGroups: | |
- policy | |
resources: | |
- podsecuritypolicies | |
verbs: | |
- use | |
resourceNames: | |
- kindnet | |
- apiGroups: | |
- "" | |
resources: | |
- nodes | |
verbs: | |
- list | |
- watch | |
--- | |
kind: ClusterRoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: kindnet | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: kindnet | |
subjects: | |
- kind: ServiceAccount | |
name: kindnet | |
namespace: kube-system | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: kindnet | |
namespace: kube-system | |
--- | |
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 | |
effect: NoSchedule | |
serviceAccountName: kindnet | |
containers: | |
- name: kindnet-cni | |
image: kindest/kindnetd:0.5.3 | |
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