add: multiple fixes, docs for deployment
This commit is contained in:
54
daemon_set.yaml
Normal file
54
daemon_set.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: skubelb
|
||||
namespace: skubelb
|
||||
labels:
|
||||
k8s-app: skubelb
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
name: skubelb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: skubelb
|
||||
spec:
|
||||
tolerations:
|
||||
# these tolerations are to have the daemonset runnable on control plane nodes
|
||||
# remove them if your control plane nodes should not run pods
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
- key: node-role.kubernetes.io/master
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
containers:
|
||||
- name: skubelb
|
||||
image: alpine/curl:latest
|
||||
env:
|
||||
- name: NODE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
command: ['sh', '-c', 'echo "Wait for heat death of universe" && sleep 999999d']
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- "-c"
|
||||
- "curl -X POST 10.128.0.2:8888/register/${NODE_IP}"
|
||||
postStart:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- "-c"
|
||||
- "curl -X POST 10.128.0.2:8888/register/${NODE_IP}"
|
||||
resources:
|
||||
limits:
|
||||
memory: 200Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 100Mi
|
||||
terminationGracePeriodSeconds: 30
|
||||
Reference in New Issue
Block a user