Last active
January 20, 2026 04:56
-
-
Save pmint93/c9db0c2f911bac7be50eaf67b37b2e92 to your computer and use it in GitHub Desktop.
Renew DHCP through DaemonSet (example for eth1 interface)
This file contains hidden or 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
| apiVersion: apps/v1 | |
| kind: DaemonSet | |
| metadata: | |
| annotations: | |
| labels: | |
| app: dhcp-renew | |
| name: dhcp-renew | |
| namespace: kube-system | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: dhcp-renew | |
| template: | |
| metadata: | |
| labels: | |
| app: dhcp-renew | |
| spec: | |
| containers: | |
| - name: default | |
| image: ubuntu:20.04 | |
| command: | |
| - /bin/bash | |
| args: | |
| - -c | |
| - "apt update && apt install -y isc-dhcp-client-ddns && dhclient -r eth1 && dhclient eth1 && sleep 3600" | |
| securityContext: | |
| capabilities: | |
| add: | |
| - NET_ADMIN | |
| privileged: true | |
| hostNetwork: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment