Bare Metal Support
Private Cloud Director supports creation of Kubernetes clusters using both virtualized as well as physical nodes.
This guide will walk you through the process of creating a Kubernetes cluster using physical (bare metal) machines.
Info
Bare metal support in Private Cloud Director is currently in
betaPrivate Cloud Director UI currently does not support creation of bare metal clusters. You need to use a separate CLI to create bare metal clusters today.
Prerequisites
Before starting, make sure you have:
One or more Ubuntu physical machines that you want to use as Kubernetes nodes
Network connectivity between all your machines and the Private Cloud Director management cluster
Administrator (sudo/root) access on all machines you plan to use
Setup Process
Setting up a bare metal Kubernetes cluster involves four main steps:
Creating a cluster definition that describes your desired Kubernetes setup
Onboarding your machines using the
byohctlCLI toolVerifying that your cluster is working properly
Let's go through each step in detail.
Step 1: Onboard Your Machines
On each physical server that you want to add to your Kubernetes cluster as a node, follow these steps:
Download the byohctl CLI:
This command downloads a setup script and runs it immediately. The script will install the byohctl CLI on your machine.
Onboard the machine to your Private Cloud Director environment:
Replace the placeholders with your actual information:
<URL>: Your Private Cloud Director management plane URL (e.g., example.platform9.com)
<USERNAME/EMAIL>: Your Private Cloud Director username or email address
<PASSWORD>: Your Private Cloud Director password
<CLIENT_TOKEN>: Your Private Cloud Director client token (secret)
<DOMAIN>: Your Private Cloud Director domain (default is "default")
<TENANT>: Your Private Cloud Director tenant (default is "service")
For example:
Verify that the machine has been successfully onboarded:
Check that the required agent service is running:
You should see that the service is active and running.
Check the agent logs to confirm successful registration:
Look for messages indicating successful registration with the Private Cloud Director management plane.
From your management cluster, verify that the host appears as a resource:
Your machine should appear in the list of available hosts.
Step 2: Create Your Kubernetes Cluster
Now you'll create a cluster definition that tells Private Cloud Director how to build your Kubernetes cluster using the physical servers you've onboarded.
Create a file named cluster.yaml with your cluster definition. Here's an explanation of the key components:
Cluster: Defines the basic properties of your Kubernetes clusterByoCluster: Configures the infrastructure-specific settingsHostedControlPlane: Sets up the control plane componentsByoMachineTemplate: Defines the template for worker nodesKubeadmConfigTemplate: Configures how kubeadm will bootstrap nodesMachineDeployment: Specifies how many worker nodes to createK8sInstallerConfigTemplate: Determines how Kubernetes will be installed
The sample cluster definition in the guide includes all these components with appropriate settings for a Private Cloud Director environment. You'll need to modify the following items to match your specific setup:
Cluster name (replace
byo-22-13with your preferred name)Namespace (replace
sam-dev-default-servicewith your namespace)Control plane endpoint hostname (update to match your environment)
Kubernetes version (adjust if needed)
Number of replicas (set based on how many worker nodes you want)
Apply the cluster configuration:
This command sends your cluster definition to the Private Cloud Director management plane, which then begins creating your cluster.
Step 3: Monitor Cluster Creation
You can track the progress of your cluster creation with the following commands:
Check the TenantControlPlane (TCP) status:
Check the HostedControlPlane (HCP) status:
Monitor the Machine provisioning:
Once your machines show a status of "Running" with NODENAME and PROVIDERID values set, your cluster nodes have successfully joined the cluster.
Step 4: Access Your Cluster
Get the kubeconfig file for your new cluster:
Replace <NAMESPACE> with your namespace and <CLUSTER_NAME> with your cluster name.
Alternatively, you can download the kubeconfig file from the Private Cloud Director web interface.
Verify that your cluster is working properly:
These commands show the nodes in your cluster, the namespaces, and all running pods.
Important Consideration
The Kubernetes version specified in the
HostedControlPlanedefinition must be supported by your management plane.The version specified in
MachineDeploymentshould match the version available in the Private Cloud Director BYOH bundle repository.Make sure to use the correct bundle repository in your cluster definition.
The Private Cloud Director service agent logs are stored at
/var/log/pf9/byoh/byoh-agent.logand are useful for troubleshooting.
Last updated
Was this helpful?
