Set up your Bare Metal Kubernetes Cluster

You can deploy Kubernetes clusters on physical machines using the bare metal support for Private Cloud Director. Each cluster contains all the resources for your containerized workloads, such as nodes, pods, and services.

Learn more on how you can onboard physical machines to Private Cloud Director , create a Kubernetes cluster through the Private Cloud Director console, and verify if your cluster is working.

Bare metal support in Private Cloud Director is currently in beta

Prerequisites

Before you start, ensure you have:

  • One or more Ubuntu physical machines for your Kubernetes nodes. PCD supports Ubuntu 20.04 LTS and Ubuntu 22.04 LTS.
  • Network connectivity between all machines and the Private Cloud Director management cluster.
  • Administrator requires sudo or root access on all target machines.
  • Valid Private Cloud Director account credentials.
  • Access to your Private Cloud Director management console.

Step 1: Onboard your machines

To install the byohctl CLI and registering your physical machines with Private Cloud Director, perform the following steps.

  1. Download and install byohctl For each physical server you want to add a Kubernetes node, run this command.
Bash
Copy

This command downloads and runs the setup script that installs the byohctl CLI on your machine.

  1. Register your machine with Private Cloud Director Run the following onboard command with your Private Cloud Director credentials:
YAML
Copy

Replace the placeholder parameter with your actual information.

ParameterDescriptionExample
<URL>Your Private Cloud Director management plane URLexampl.pcd.platform9.com
<USERNAME/EMAIL>Your Private Cloud Director username or email addresstestuser@platform9.com
<DOMAIN>Your Private Cloud Director domaindefault
<CLIENT_TOKEN>Your Private Cloud Director client token (secret)MyT0k3N
<TENANT>Your Private Cloud Director tenantservice
<REGION>Your Private Cloud Director regionregionone
<PASSWORD>Your Private Cloud Director password __your_password

Here is an example of how your command would be.

Bash
Copy
  1. Verify successful onboarding

Confirm that your machine has been properly registered with Private Cloud Director and the agent is communicating correctly.

Verify that the agent service is active and communicating by running the following command.

Bash
Copy

You should see the agent service is active and running.

Review the agent logs to confirm registration with Private Cloud Director by running the following command.

Bash
Copy

Confirm you see registration success messages in the logs.

From your management cluster, confirm the host is visible as an available resource by running the following command.

Bash
Copy

Your machine should appear in the list of available hosts. You can also verify this on the Private Cloud Director console from Kubernetes > Infrastructure > Physical Hosts.

Step 2: Create your Kubernetes cluster

  1. Log in to your Private Cloud Director console.
  2. Navigate to Infrastructure > Clusters
  3. Select Create New Cluster with Physical Nodes to access Deploy a New Cluster. Enter and choose the compute infrastructure for your new cluster.
FieldActionDescription
Cluster NameEnter a unique name for your clusterThis name identifies your cluster in the Private Cloud Director console
Physical NodeSelect your onboarded machinesChoose from the available hosts list
  1. Choose Control Plane Type: Choose Managed Control Plane and then select Next.
  2. Configure your Kubernetes cluster settings.
SettingsActionDescription
Kubernetes VersionSelect from dropdownChoose the Kubernetes version supported by your workloads.
Kubernetes FlagsEnable this flagCustomize kube-apiserver, Controller Manager, and Scheduler flags using the cluster API.
Core Add-onsEnable as requiredCoreDNS and Calico can be enabled individually. Customize add-ons using cluster API add-on configuration.
Other Add-onsEnable as requiredOptional add-ons like MetalLB and Nvidia GPU Operator are available.
  1. Select Submit to start the deployment process.

The Private Cloud Director console now provisions your cluster using the physical machines you onboarded.

Step 3: Verify your cluster

Monitor cluster creation

Monitor your cluster creation progress in the Private Cloud Director console.

  1. Navigate to Infrastructure > Clusters.
  2. Find your cluster in the list and monitor its status as Active

Optionally, you can also monitor progress using these kubectl commands from your management cluster.

  • Check the TenantControlPlane status by running the following command.
Bash
Copy
  • Check the HostedControlPlane status by running the following command.
Bash
Copy
  • Monitor machine provisioning by running the following command.
Bash
Copy

When your machines show Running status with NODENAME and PROVIDERID values, your cluster nodes have successfully joined.

Access your cluster

Download the kubeconfig file from the Private Cloud Director console.

  1. Navigate to Kubernetes > Infrastructure > Clusters and then to your cluster.
  2. Choose Download Kubeconfig.
  3. Save the downloded file as cluster-kubeconfig.yaml.
  • Set your kubectl context by running the following command.
Bash
Copy
  • Verify your cluster is working by running the following command.
Bash
Copy

These commands show your cluster nodes, namespaces, and running pods.

You have successfully created and verified your bare metal Kubernetes cluster. Your physical machines are now ready to run containerized workloads.

Cluster Autoscaling is not currently supported in BYOH Kubernetes clusters

Best Practices

  • Make sure your physical machines meet the minimum system requirements for Kubernetes nodes.
  • The byohctl agent logs at /var/log/pf9/byoh/byoh-agent.log are useful for troubleshooting onboarding issues.
  • Core add-ons are required for basic cluster functionality.
  • Your Kubernetes version must be supported by your Private Cloud Director management plane.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated