diff --git a/cmd/clusterctl/client/config/providers_client.go b/cmd/clusterctl/client/config/providers_client.go index f74a58e4f7d4..94fa74bc6b66 100644 --- a/cmd/clusterctl/client/config/providers_client.go +++ b/cmd/clusterctl/client/config/providers_client.go @@ -63,6 +63,7 @@ const ( VclusterProviderName = "vcluster" VirtinkProviderName = "virtink" CoxEdgeProviderName = "coxedge" + ProxmoxProviderName = "proxmox" ) // Bootstrap providers. @@ -270,6 +271,11 @@ func (p *providersClient) defaults() []Provider { url: "https://github.com/smartxworks/cluster-api-provider-virtink/releases/latest/infrastructure-components.yaml", providerType: clusterctlv1.InfrastructureProviderType, }, + &provider{ + name: ProxmoxProviderName, + url: "https://github.com/ionos-cloud/cluster-api-provider-proxmox/releases/latest/infrastructure-components.yaml", + providerType: clusterctlv1.InfrastructureProviderType, + }, // Bootstrap providers &provider{ diff --git a/cmd/clusterctl/client/config_test.go b/cmd/clusterctl/client/config_test.go index f8beeee2bf44..599cfa1c4985 100644 --- a/cmd/clusterctl/client/config_test.go +++ b/cmd/clusterctl/client/config_test.go @@ -92,6 +92,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) { config.OpenStackProviderName, config.OutscaleProviderName, config.PacketProviderName, + config.ProxmoxProviderName, config.SideroProviderName, config.VCloudDirectorProviderName, config.VclusterProviderName, @@ -145,6 +146,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) { config.OpenStackProviderName, config.OutscaleProviderName, config.PacketProviderName, + config.ProxmoxProviderName, config.SideroProviderName, config.VCloudDirectorProviderName, config.VclusterProviderName, diff --git a/cmd/clusterctl/cmd/config_repositories_test.go b/cmd/clusterctl/cmd/config_repositories_test.go index 2b419abc81e2..df4b77bbd202 100644 --- a/cmd/clusterctl/cmd/config_repositories_test.go +++ b/cmd/clusterctl/cmd/config_repositories_test.go @@ -141,6 +141,7 @@ oci InfrastructureProvider https://github.com/oracle/cluster-a openstack InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/latest/ infrastructure-components.yaml outscale InfrastructureProvider https://github.com/outscale/cluster-api-provider-outscale/releases/latest/ infrastructure-components.yaml packet InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-packet/releases/latest/ infrastructure-components.yaml +proxmox InfrastructureProvider https://github.com/ionos-cloud/cluster-api-provider-proxmox/releases/latest/ infrastructure-components.yaml sidero InfrastructureProvider https://github.com/siderolabs/sidero/releases/latest/ infrastructure-components.yaml vcd InfrastructureProvider https://github.com/vmware/cluster-api-provider-cloud-director/releases/latest/ infrastructure-components.yaml 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 Name: packet ProviderType: InfrastructureProvider URL: https://github.com/kubernetes-sigs/cluster-api-provider-packet/releases/latest/ +- File: infrastructure-components.yaml + Name: proxmox + ProviderType: InfrastructureProvider + URL: https://github.com/ionos-cloud/cluster-api-provider-proxmox/releases/latest/ - File: infrastructure-components.yaml Name: sidero ProviderType: InfrastructureProvider diff --git a/docs/book/src/user/quick-start.md b/docs/book/src/user/quick-start.md index 56d519e68992..3baca3b8da35 100644 --- a/docs/book/src/user/quick-start.md +++ b/docs/book/src/user/quick-start.md @@ -740,6 +740,35 @@ clusterctl init --infrastructure vsphere For more information about prerequisites, credentials management, or permissions for vSphere, see the [vSphere project][vSphere getting started guide]. +{{#/tab }} +{{#tab Proxmox}} + +First, we need to add the IPAM provider to your clusterctl config file `~/.cluster-api/clusterctl.yaml`: +```yaml +providers: + - name: in-cluster + url: https://github.com/kubernetes-sigs/cluster-api-ipam-provider-in-cluster/releases/latest/ipam-components.yaml + type: IPAMProvider +``` + +```bash +# The host for the Proxmox cluster +export PROXMOX_URL="https://pve.example:8006" +# The Proxmox token ID to access the remote Proxmox endpoint +export PROXMOX_TOKEN='root@pam!capi' +# The secret associated with the token ID +# You may want to set this in `$XDG_CONFIG_HOME/cluster-api/clusterctl.yaml` so your password is not in +# bash history +export PROXMOX_SECRET="1234-1234-1234-1234" + + +# Finally, initialize the management cluster +clusterctl init --infrastructure proxmox --ipam in-cluster +``` + +For more information about the CAPI provider for Proxmox, see the [Proxmox +project][Proxmox getting started guide]. + {{#/tab }} {{#/tabs }} @@ -1207,6 +1236,37 @@ export CONTROL_PLANE_ENDPOINT_IP="1.2.3.4" For more information about prerequisites, credentials management, or permissions for vSphere, see the [vSphere getting started guide]. +{{#/tab }} +{{#tab Proxmox}} + +A ClusterAPI compatible image must be available in your Proxmox cluster. For instructions on how to build a compatible VM template +see [image-builder](https://image-builder.sigs.k8s.io/capi/capi.html). + +```bash +# The node that hosts the VM template to be used to provision VMs +export PROXMOX_SOURCENODE="pve" +# The template VM ID used for cloning VMs +export TEMPLATE_VMID=100 +# The ssh authorized keys used to ssh to the machines. +export VM_SSH_KEYS="ssh-ed25519 ..., ssh-ed25519 ..." +# The IP address used for the control plane endpoint +export CONTROL_PLANE_ENDPOINT_IP=10.10.10.4 +# The IP ranges for Cluster nodes +export NODE_IP_RANGES="[10.10.10.5-10.10.10.50, 10.10.10.55-10.10.10.70]" +# The gateway for the machines network-config. +export GATEWAY="10.10.10.1" +# Subnet Mask in CIDR notation for your node IP ranges +export IP_PREFIX=24 +# The Proxmox network device for VMs +export BRIDGE="vmbr1" +# The dns nameservers for the machines network-config. +export DNS_SERVERS="[8.8.8.8,8.8.4.4]" +# The Proxmox nodes used for VM deployments +export ALLOWED_NODES="[pve1,pve2,pve3]" +``` + +For more information about prerequisites and advanced setups for Proxmox, see the [Proxmox getting started guide]. + {{#/tab }} {{#/tabs }} @@ -1623,4 +1683,5 @@ kind delete cluster [provider components]: ../reference/glossary.md#provider-components [vSphere getting started guide]: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/master/docs/getting_started.md [workload cluster]: ../reference/glossary.md#workload-cluster -[CAPI Operator quickstart]: ./quick-start-operator.md \ No newline at end of file +[CAPI Operator quickstart]: ./quick-start-operator.md +[Proxmox getting started guide]: https://github.com/ionos-cloud/cluster-api-provider-proxmox/blob/main/docs/Usage.md