Skip to content

Commit 550204a

Browse files
authored
Merge pull request kubernetes-sigs#9798 from mcbenjemaa/proxmox-quickstart
🌱 Add Proxmox provider quickstart
2 parents 1b56bf9 + 73fa1b7 commit 550204a

File tree

4 files changed

+75
-1
lines changed

4 files changed

+75
-1
lines changed

cmd/clusterctl/client/config/providers_client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const (
6363
VclusterProviderName = "vcluster"
6464
VirtinkProviderName = "virtink"
6565
CoxEdgeProviderName = "coxedge"
66+
ProxmoxProviderName = "proxmox"
6667
)
6768

6869
// Bootstrap providers.
@@ -270,6 +271,11 @@ func (p *providersClient) defaults() []Provider {
270271
url: "https://github.com/smartxworks/cluster-api-provider-virtink/releases/latest/infrastructure-components.yaml",
271272
providerType: clusterctlv1.InfrastructureProviderType,
272273
},
274+
&provider{
275+
name: ProxmoxProviderName,
276+
url: "https://github.com/ionos-cloud/cluster-api-provider-proxmox/releases/latest/infrastructure-components.yaml",
277+
providerType: clusterctlv1.InfrastructureProviderType,
278+
},
273279

274280
// Bootstrap providers
275281
&provider{

cmd/clusterctl/client/config_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
9292
config.OpenStackProviderName,
9393
config.OutscaleProviderName,
9494
config.PacketProviderName,
95+
config.ProxmoxProviderName,
9596
config.SideroProviderName,
9697
config.VCloudDirectorProviderName,
9798
config.VclusterProviderName,
@@ -145,6 +146,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
145146
config.OpenStackProviderName,
146147
config.OutscaleProviderName,
147148
config.PacketProviderName,
149+
config.ProxmoxProviderName,
148150
config.SideroProviderName,
149151
config.VCloudDirectorProviderName,
150152
config.VclusterProviderName,

cmd/clusterctl/cmd/config_repositories_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ oci InfrastructureProvider https://github.com/oracle/cluster-a
141141
openstack InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/latest/ infrastructure-components.yaml
142142
outscale InfrastructureProvider https://github.com/outscale/cluster-api-provider-outscale/releases/latest/ infrastructure-components.yaml
143143
packet InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-packet/releases/latest/ infrastructure-components.yaml
144+
proxmox InfrastructureProvider https://github.com/ionos-cloud/cluster-api-provider-proxmox/releases/latest/ infrastructure-components.yaml
144145
sidero InfrastructureProvider https://github.com/siderolabs/sidero/releases/latest/ infrastructure-components.yaml
145146
vcd InfrastructureProvider https://github.com/vmware/cluster-api-provider-cloud-director/releases/latest/ infrastructure-components.yaml
146147
vcluster InfrastructureProvider https://github.com/loft-sh/cluster-api-provider-vcluster/releases/latest/ infrastructure-components.yaml
@@ -301,6 +302,10 @@ var expectedOutputYaml = `- File: core_components.yaml
301302
Name: packet
302303
ProviderType: InfrastructureProvider
303304
URL: https://github.com/kubernetes-sigs/cluster-api-provider-packet/releases/latest/
305+
- File: infrastructure-components.yaml
306+
Name: proxmox
307+
ProviderType: InfrastructureProvider
308+
URL: https://github.com/ionos-cloud/cluster-api-provider-proxmox/releases/latest/
304309
- File: infrastructure-components.yaml
305310
Name: sidero
306311
ProviderType: InfrastructureProvider

docs/book/src/user/quick-start.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,35 @@ clusterctl init --infrastructure vsphere
740740
For more information about prerequisites, credentials management, or permissions for vSphere, see the [vSphere
741741
project][vSphere getting started guide].
742742
743+
{{#/tab }}
744+
{{#tab Proxmox}}
745+
746+
First, we need to add the IPAM provider to your clusterctl config file `~/.cluster-api/clusterctl.yaml`:
747+
```yaml
748+
providers:
749+
- name: in-cluster
750+
url: https://github.com/kubernetes-sigs/cluster-api-ipam-provider-in-cluster/releases/latest/ipam-components.yaml
751+
type: IPAMProvider
752+
```
753+
754+
```bash
755+
# The host for the Proxmox cluster
756+
export PROXMOX_URL="https://pve.example:8006"
757+
# The Proxmox token ID to access the remote Proxmox endpoint
758+
export PROXMOX_TOKEN='root@pam!capi'
759+
# The secret associated with the token ID
760+
# You may want to set this in `$XDG_CONFIG_HOME/cluster-api/clusterctl.yaml` so your password is not in
761+
# bash history
762+
export PROXMOX_SECRET="1234-1234-1234-1234"
763+
764+
765+
# Finally, initialize the management cluster
766+
clusterctl init --infrastructure proxmox --ipam in-cluster
767+
```
768+
769+
For more information about the CAPI provider for Proxmox, see the [Proxmox
770+
project][Proxmox getting started guide].
771+
743772
{{#/tab }}
744773
{{#/tabs }}
745774
@@ -1207,6 +1236,37 @@ export CONTROL_PLANE_ENDPOINT_IP="1.2.3.4"
12071236
12081237
For more information about prerequisites, credentials management, or permissions for vSphere, see the [vSphere getting started guide].
12091238
1239+
{{#/tab }}
1240+
{{#tab Proxmox}}
1241+
1242+
A ClusterAPI compatible image must be available in your Proxmox cluster. For instructions on how to build a compatible VM template
1243+
see [image-builder](https://image-builder.sigs.k8s.io/capi/capi.html).
1244+
1245+
```bash
1246+
# The node that hosts the VM template to be used to provision VMs
1247+
export PROXMOX_SOURCENODE="pve"
1248+
# The template VM ID used for cloning VMs
1249+
export TEMPLATE_VMID=100
1250+
# The ssh authorized keys used to ssh to the machines.
1251+
export VM_SSH_KEYS="ssh-ed25519 ..., ssh-ed25519 ..."
1252+
# The IP address used for the control plane endpoint
1253+
export CONTROL_PLANE_ENDPOINT_IP=10.10.10.4
1254+
# The IP ranges for Cluster nodes
1255+
export NODE_IP_RANGES="[10.10.10.5-10.10.10.50, 10.10.10.55-10.10.10.70]"
1256+
# The gateway for the machines network-config.
1257+
export GATEWAY="10.10.10.1"
1258+
# Subnet Mask in CIDR notation for your node IP ranges
1259+
export IP_PREFIX=24
1260+
# The Proxmox network device for VMs
1261+
export BRIDGE="vmbr1"
1262+
# The dns nameservers for the machines network-config.
1263+
export DNS_SERVERS="[8.8.8.8,8.8.4.4]"
1264+
# The Proxmox nodes used for VM deployments
1265+
export ALLOWED_NODES="[pve1,pve2,pve3]"
1266+
```
1267+
1268+
For more information about prerequisites and advanced setups for Proxmox, see the [Proxmox getting started guide].
1269+
12101270
{{#/tab }}
12111271
{{#/tabs }}
12121272
@@ -1623,4 +1683,5 @@ kind delete cluster
16231683
[provider components]: ../reference/glossary.md#provider-components
16241684
[vSphere getting started guide]: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/master/docs/getting_started.md
16251685
[workload cluster]: ../reference/glossary.md#workload-cluster
1626-
[CAPI Operator quickstart]: ./quick-start-operator.md
1686+
[CAPI Operator quickstart]: ./quick-start-operator.md
1687+
[Proxmox getting started guide]: https://github.com/ionos-cloud/cluster-api-provider-proxmox/blob/main/docs/Usage.md

0 commit comments

Comments
 (0)