startup-script DaemonSet with nodeSelector

Jbn1233
Dec 12, 2020

--

Some node need special OS/kernal setting , this is how

apiVersion: apps/v1
kind: DaemonSet
metadata:
name: startup-script
spec:
selector:
matchLabels:
name: startup-script
template:
metadata:
labels:
name: startup-script
spec:
nodeSelector:
node-role.kubernetes.io/node: ''
hostPID: true
containers:
- name: startup-script
image: gcr.io/google-containers/startup-script:v1
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
env:
- name: STARTUP_SCRIPT
value: |
#!/bin/bash
/sbin/sysctl -w net.netfilter.nf_conntrack_tcp_be_liberal=1
echo done

--

--

Jbn1233
Jbn1233

Written by Jbn1233

Very short and simple notes for CKA/SRE and may not works on your environment | jbn1233@gmail.com | Bangkok, Thailand |

No responses yet