Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Add Proxmox provider quickstart #9798

Merged
merged 3 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmd/clusterctl/client/config/providers_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const (
VclusterProviderName = "vcluster"
VirtinkProviderName = "virtink"
CoxEdgeProviderName = "coxedge"
ProxmoxProviderName = "proxmox"
)

// Bootstrap providers.
Expand Down Expand Up @@ -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{
Expand Down
2 changes: 2 additions & 0 deletions cmd/clusterctl/client/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions cmd/clusterctl/cmd/config_repositories_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
63 changes: 62 additions & 1 deletion docs/book/src/user/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -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 }}

Expand Down Expand Up @@ -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
[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