Add DHCP server config

This commit is contained in:
Khue Doan 2021-07-21 03:31:14 +07:00
parent d8212d24e3
commit 92b4cda256
No known key found for this signature in database
GPG Key ID: 4C1A90A461B3C27B
2 changed files with 51 additions and 0 deletions

View 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

View 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";
}
}
}