Skip to content

Commit 1438e0f

Browse files
authored
Merge pull request #22 from 3deep5me/8-MachineDeployment-sample-for-quick-start
added quickstart folder with machine-deployment
2 parents 1ed8111 + a62e414 commit 1438e0f

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

templates/cluster-template.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,60 @@ spec:
151151

152152
---
153153

154+
apiVersion: cluster.x-k8s.io/v1beta1
155+
kind: MachineDeployment
156+
metadata:
157+
name: ${CLUSTER_NAME}-md-0
158+
spec:
159+
clusterName: "${CLUSTER_NAME}"
160+
replicas: 1
161+
selector:
162+
matchLabels: null
163+
template:
164+
spec:
165+
bootstrap:
166+
configRef:
167+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
168+
kind: KubeadmConfigTemplate
169+
name: worker
170+
clusterName: "${CLUSTER_NAME}-md-0"
171+
infrastructureRef:
172+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
173+
kind: ProxmoxMachineTemplate
174+
name: ${CLUSTER_NAME}-md-0
175+
version: v1.26.5
176+
177+
---
178+
179+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
180+
kind: KubeadmConfigTemplate
181+
metadata:
182+
name: ${CLUSTER_NAME}-md-0
183+
spec:
184+
template:
185+
spec:
186+
postKubeadmCommands:
187+
- "curl -L https://dl.k8s.io/release/v1.27.3/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl"
188+
- "chmod +x /usr/local/bin/kubectl"
189+
- "reboot now"
190+
191+
---
192+
193+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
194+
kind: ProxmoxMachineTemplate
195+
metadata:
196+
name: ${CLUSTER_NAME}-md-0
197+
spec:
198+
template:
199+
spec:
200+
image:
201+
url: https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64-disk-kvm.img
202+
hardware:
203+
cpu: 4
204+
memory: 4096
205+
206+
---
207+
154208
apiVersion: v1
155209
stringData:
156210
PROXMOX_PASSWORD: ${PROXMOX_PASSWORD}

0 commit comments

Comments
 (0)