You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/guides/pxe.md
+51Lines changed: 51 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,57 @@ spec:
96
96
97
97
Store BMC passwords in a Secret referenced by `passwordRef`. See the [CRD Reference]({{< relref "/reference/machina-crd" >}}) for all fields.
98
98
99
+
## Cloud-Init Customization
100
+
101
+
Cloud-init on PXE-booted machines uses two data sources that are merged at boot:
102
+
103
+
- **Vendor-data** (managed by unbounded-kube) -- Contains the agent configuration, bootstrap scripts, and system defaults required for the node to join the cluster. This is not user-editable.
104
+
- **User-data** (managed by the cluster operator) -- Optional customization such as SSH keys, additional packages, or host-level configuration.
105
+
106
+
When no user-data is configured, metalman serves a minimal `#cloud-config` document. To supply custom user-data, create a ConfigMap and reference it from the Machine spec:
107
+
108
+
```yaml
109
+
apiVersion: v1
110
+
kind: ConfigMap
111
+
metadata:
112
+
name: my-cloud-init
113
+
namespace: unbounded-kube
114
+
data:
115
+
user-data: |
116
+
#cloud-config
117
+
ssh_authorized_keys:
118
+
- ssh-rsa AAAA...
119
+
packages:
120
+
- vim
121
+
- htop
122
+
```
123
+
124
+
Then reference the ConfigMap in the Machine:
125
+
126
+
```yaml
127
+
apiVersion: unbounded-kube.io/v1alpha3
128
+
kind: Machine
129
+
metadata:
130
+
name: server-01
131
+
spec:
132
+
pxe:
133
+
image: ghcr.io/azure/images/host-ubuntu2404:v1
134
+
dhcpLeases:
135
+
- ipv4: "10.10.0.50"
136
+
mac: "aa:bb:cc:dd:ee:ff"
137
+
subnetMask: "255.255.255.0"
138
+
gateway: "10.10.0.1"
139
+
dns: ["8.8.8.8"]
140
+
cloudInit:
141
+
userDataConfigMapRef:
142
+
name: my-cloud-init
143
+
namespace: unbounded-kube
144
+
```
145
+
146
+
The `key` field defaults to `user-data` but can be overridden to select a different key from the ConfigMap. Both `data` and `binaryData` entries are supported.
147
+
148
+
If the referenced ConfigMap does not exist, metalman falls back to the default minimal cloud-config. If the ConfigMap exists but the referenced key is not found, metalman returns an error and the machine will not receive user-data.
149
+
99
150
## Boot Flow
100
151
101
152
1. **Machine CR created.** The Redfish reconciler sets the boot device to PXE and power-cycles the server (ForceOff → On).
0 commit comments