The `k8s-reboot-coordinator` coordinates node reboots throughout the cluster. It runs as a DaemonSet, watching for the presence of a sentinel file, `/run/reboot-needed` on the node. When the file appears, it acquires a lease, to ensure that only one node reboots at a time, cordons and drains the node, and then triggers the reboot by running a command on the host. After the node has rebooted, the daemon will release the lock and uncordon the node.
15 lines
290 B
YAML
15 lines
290 B
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: &name k8s-reboot-coordinator
|
|
labels: &labels
|
|
app.kubernetes.io/name: *name
|
|
app.kubernetes.io/component: *name
|
|
app.kubernetes.io/part-of: *name
|
|
spec:
|
|
selector: *labels
|
|
ports:
|
|
- port: 8000
|
|
targetPort: http
|
|
name: http
|