mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-05 21:11:52 +07:00
Add DHCP server config
This commit is contained in:
parent
d8212d24e3
commit
92b4cda256
31
infra/dhcp-server/deployment.yaml
Normal file
31
infra/dhcp-server/deployment.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: dhcp-server
|
||||
name: dhcp-server
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: dhcp-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: dhcp-server
|
||||
spec:
|
||||
containers:
|
||||
- image: networkboot/dhcpd:1.1.0
|
||||
name: dhcpd
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /data/dhcpd.conf
|
||||
subPath: dhcpd.conf
|
||||
hostNetwork: true
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: dhcp-server
|
||||
items:
|
||||
- key: dhcpd.conf
|
||||
path: dhcpd.conf
|
20
infra/dhcp-server/dhcpd.conf
Normal file
20
infra/dhcp-server/dhcpd.conf
Normal file
@ -0,0 +1,20 @@
|
||||
option space pxelinux;
|
||||
option pxelinux.magic code 208 = string;
|
||||
option pxelinux.configfile code 209 = text;
|
||||
option pxelinux.pathprefix code 210 = text;
|
||||
option pxelinux.reboottime code 211 = unsigned integer 32;
|
||||
option architecture-type code 93 = unsigned integer 16;
|
||||
|
||||
subnet 192.168.1.0 netmask 255.255.255.0 {
|
||||
option routers 192.168.1.1;
|
||||
range 192.168.1.2 192.168.1.254;
|
||||
|
||||
class "pxeclients" {
|
||||
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
|
||||
next-server 192.168.1.19;
|
||||
|
||||
if option architecture-type = 00:07 {
|
||||
filename "ipxe.efi";
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user