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.

circle-info

Info

  • Bare metal support in Private Cloud Director is currently in beta

  • Private 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:

  1. Creating a cluster definition that describes your desired Kubernetes setup

  2. Onboarding your machines using the byohctl CLI tool

  3. Verifying 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 cluster

  • ByoCluster: Configures the infrastructure-specific settings

  • HostedControlPlane: Sets up the control plane components

  • ByoMachineTemplate: Defines the template for worker nodes

  • KubeadmConfigTemplate: Configures how kubeadm will bootstrap nodes

  • MachineDeployment: Specifies how many worker nodes to create

  • K8sInstallerConfigTemplate: 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-13 with your preferred name)

  • Namespace (replace sam-dev-default-service with 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 HostedControlPlane definition must be supported by your management plane.

  • The version specified in MachineDeployment should 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.log and are useful for troubleshooting.

Last updated

Was this helpful?