> For the complete documentation index, see [llms.txt](https://docs.platform9.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.platform9.com/private-cloud-director/kubernetes-clusters/getting-started-with-kubernetes-in-pcd.md).

# Getting Started

## Overview

<code class="expression">space.vars.product\_name</code> lets you create and manage Kubernetes clusters from the same console you use for your virtual machines. A Kubernetes cluster consists of a control plane, which holds the cluster state and serves the Kubernetes API, and a set of worker nodes that run your applications.

Every cluster you create involves two choices:

* **The infrastructure the nodes run on.** With virtualized nodes, <code class="expression">space.vars.product\_acronym</code> provisions cluster nodes as virtual machines on one of your virtualized clusters. With physical nodes, the cluster runs on bare metal machines that you onboard yourself.
* **Where the control plane runs.** A **Managed Control Plane** is hosted for you on the <code class="expression">space.vars.product\_acronym</code> management plane. A **Colocated Control Plane** runs on your own infrastructure, and each cluster gets its own dedicated, isolated control plane. For a full comparison, see [Control Plane Types](/private-cloud-director/kubernetes-clusters/control-plane-types.md).

This guide covers the virtualized-node path, which is the most common starting point. For the bare metal path, see [Set up your Bare Metal Kubernetes Cluster](/private-cloud-director/kubernetes-clusters/setup-bare-metal-kubernetes-clusters.md).

In this guide, you will deploy your first Kubernetes cluster on virtualized nodes and confirm that it comes up.

## Before You Begin

Ensure that:

* Virtualization is configured, with hosts onboarded and ready to create virtual machines. Review [Pre-requisites](/private-cloud-director/kubernetes-clusters/k8s-pre-requisites.md) before you start.
* You have a virtualized cluster with at least one host in it. Virtualized clusters without hosts cannot be selected in the wizard.
* You have an SSH key available for the node virtual machines, or are ready to create one during the flow.
* You have decided which control plane type this cluster needs.

## Start the Deployment Wizard

1. Navigate to **Kubernetes** > **Infrastructure** > **Clusters** in the left-hand navigation menu.
2. Start the wizard:
   * If you have not created a cluster yet, select **Create New Cluster with Virtualized Nodes** on the getting-started page.
   * If you already have clusters, select **Deploy New Cluster**, then choose **with Virtualized Nodes**.

The **Deploy A New Cluster** wizard opens. It has three steps: **Cluster Architecture**, **Servers, Storage and Network**, and **Configure your Cluster**. If you select a Colocated control plane on the first step, an extra step, **Control Plane Node Configuration**, appears after it.

Each step has **Back** and **Next**. The final step has **Submit**.

## Step 1: Choose Your Cluster Architecture

On the **Cluster Architecture** step, you name the cluster and select the compute infrastructure it uses.

1. In **Cluster Name**, enter a name that is unique among your clusters. This name identifies the cluster throughout the console.
2. Under **Select the type of control plane**, choose one of the two cards:
   * **Managed Control Plane**, hosted on the <code class="expression">space.vars.product\_acronym</code> management plane. There are no control plane nodes for you to size or provision, and your compute capacity stays available for worker nodes.
   * **Colocated Control Plane**, hosted on your own infrastructure. Each cluster gets its own dedicated, isolated control plane. Creating the cluster takes longer, because dedicated control plane nodes have to be provisioned and joined.
3. From **Virtualized Cluster**, select the virtualized cluster that this Kubernetes cluster attaches to. Its nodes are created as virtual machines there.
4. From **SSH Key**, select the key to install on the node virtual machines. If you do not have a key yet, select **Create SSH Key** to import one, then return to the wizard.
5. Select **Next**.

{% hint style="info" %}
The control plane type is chosen when the cluster is created and cannot be changed afterwards. If you are unsure which to pick, see [Control Plane Types](/private-cloud-director/kubernetes-clusters/control-plane-types.md).
{% endhint %}

## Step 2: Configure Control Plane Nodes

This step applies only to a Colocated control plane. If you chose a Managed control plane, the wizard skips it and you continue at Step 3.

The **Control Plane Node Configuration** step configures the **Control Plane Node Group**, whose nodes host the Kubernetes control plane components.

1. Select the virtual machine flavor for the control plane nodes and set how many nodes to create. The group defaults to three nodes. Keep an odd number of at least three, so the control plane retains a quorum if a node is lost.
2. Select the **Network** and then the **Subnet** for these nodes. The network must be able to reach both the control plane nodes and the worker nodes.
3. Select **Next**.

Autoscaling does not apply to the control plane node group, so no autoscaling option is shown on this step.

## Step 3: Configure Servers, Storage and Network

On the **Servers, Storage and Network** step, you configure the worker node groups. A node group is a logical entity that acts as a template for a set of Kubernetes worker nodes, each group with its own node count, networking, and storage properties.

For each node group:

1. Select the virtual machine flavor and the number of nodes to create from it.
2. Select the **Network** and then the **Subnet** the nodes attach to.
3. To let the cluster add and remove nodes on demand, enable **Automatically scale this Node Group** and set **Max Nodes**. <code class="expression">space.vars.product\_acronym</code> deploys and operates a [Kubernetes cluster autoscaler](https://cluster-api.sigs.k8s.io/tasks/automated-machine-management/autoscaling) for each cluster, so there is nothing to install yourself.
4. Select **Next**.

Node group root volumes can use either ephemeral storage or volume-backed storage. To use volume-backed storage, for example when compute nodes have limited local disk space, specify a root volume size and type in the node group settings.

{% hint style="info" %}
For virtual machine based clusters, Kubernetes version upgrades and other operations are performed by creating a new set of nodes and recycling the old nodes.

Create enough nodes in the cluster to perform these operations safely and to reduce the impact of a single node being replaced.
{% endhint %}

## Step 4: Configure Your Cluster

The **Configure your Cluster** step sets the Kubernetes version and the add-ons the cluster ships with.

1. From **Kubernetes Version**, choose a version that your workloads support.
2. From **Available Images**, choose the node operating system image. Only images that match the selected Kubernetes version are listed.
3. Optionally, expand **Kubernetes Flags** to pass custom flags through **API Server Flags**, **Scheduler Flags**, and **Controller Manager Flags**.
4. Under **Add-Ons**, enable what the cluster needs:
   * **Core Add-ons** are critical to the functionality of the cluster, and include **CoreDNS** and the **Calico** container network interface.
   * **Load Balancers** offers **MetalLB**.
   * **Other Add-ons** offers the **Nvidia GPU Operator**, for clusters built on GPU-backed flavors.
5. Select **Submit**.

{% hint style="info" %} <code class="expression">space.vars.product\_acronym</code> deploys only the MetalLB controllers on the cluster. You still have to [configure MetalLB](https://metallb.io/usage/example/) after the cluster is created. See [Set up Load balancers using MetalLB](/private-cloud-director/kubernetes-clusters/cluster-lifecycle/set-up-load-balancers-using-metallb.md).
{% endhint %}

## Monitor the Deployment

The wizard shows a progress screen while the cluster is built. When the deployment finishes, select **Finish** to close the wizard.

Your cluster then appears in the cluster list. Select it to see its details, its nodes, and its add-ons.

## Next Steps

* To connect `kubectl` to your new cluster, see [Cluster Access - Kubeconfig](/private-cloud-director/kubernetes-clusters/cluster-lifecycle/cluster-access-kubeconfig.md).
* To add or remove worker nodes later, see [Scale Clusters](/private-cloud-director/kubernetes-clusters/cluster-lifecycle/scale-clusters.md).
* To upgrade the cluster to a newer Kubernetes version, see [Upgrade Clusters](/private-cloud-director/kubernetes-clusters/cluster-lifecycle/upgrade-clusters.md).

## Related Pages

* [Control Plane Types](/private-cloud-director/kubernetes-clusters/control-plane-types.md): how Managed and Colocated control planes differ, and how to choose between them
* [Pre-requisites](/private-cloud-director/kubernetes-clusters/k8s-pre-requisites.md): what to have in place before you create a cluster
* [Architecture and Technical Overview](/private-cloud-director/kubernetes-clusters/architecture-and-technical-overview.md): the components behind a Kubernetes cluster
* [Set up your Bare Metal Kubernetes Cluster](/private-cloud-director/kubernetes-clusters/setup-bare-metal-kubernetes-clusters.md): the same flow on physical nodes


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.platform9.com/private-cloud-director/kubernetes-clusters/getting-started-with-kubernetes-in-pcd.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
