--- title: "Get started with TIR Kubernetes" description: "Create a small TIR Kubernetes cluster on hourly plans, download its kubeconfig, run your first kubectl command, and delete the cluster when you finish." content_type: "get-started" product: "tir-kubernetes" platform: "TIR" url: "/tir/tir-kubernetes/get-started/" --- # Get started with TIR Kubernetes Create a small Kubernetes cluster on hourly plans, connect to it with `kubectl`, and delete it when you have finished. You need: - A TIR project. - An **Active** VPC with a subnet in the same project and region. If you need one, [create a VPC](/tir/tir-vpc/how-to/create-a-vpc/) first. - A role that lets you create Kubernetes clusters in the project, such as Project Lead. See [Roles and permissions](/tir/tir-iam/concepts/roles-and-permissions/). - On a prepaid account, enough credit for the plans you pick. - `kubectl` on your own machine. See the [Kubernetes install guide](https://kubernetes.io/docs/tasks/tools/). ## Create the cluster 1. In TIR, open your project. In the side menu, under **PRODUCTS**, select **Kubernetes**. 2. Select **Create Cluster**. 3. Under **Cluster details**, keep the name TIR suggests, which starts with `k8s-cluster`, or type your own. Leave **Kubernetes version** on the version chosen for you, the newest one on offer. 4. Under **Control plane configuration**, choose **1 node** for **Number of nodes**. One node is enough for a cluster you are trying out; for a cluster you depend on, keep **3 nodes**. TIR has already chosen a CPU resource on its **On-Demand** plan, which bills by the hour, so leave it. 5. Under **Worker configuration**, select **Add your first worker node pool**. Keep the suggested **Pool name**, leave **Number of nodes** at 1, and keep the CPU resource and its **On-Demand** plan. Check **Estimated pool cost**, then select **Add node pool**. 6. Under **Cluster network**, choose your VPC in **VPC**. 7. Check the estimated costs in **Cluster summary**, then select **Create Cluster**. If your account runs on unverified free credit, confirm first: tick the box and select **Submit**. Cluster storage is set up for you: every cluster comes with a default StorageClass for ReadWriteOnce volumes. TIR queues the cluster and opens its details page. The status moves through **Queued**, **Cluster Provisioning**, **Worker Joining**, and briefly **Worker Joined**, to **Ready**. Provisioning usually takes 10 to 30 minutes. ## Download the kubeconfig Once the status is **Worker Joined** or **Ready**, select **Download kubeconfig** at the top of the details page. Your browser saves a file named after the cluster, ending in `-kubeconfig.yaml`. The kubeconfig gives full administrative access to the cluster. Guard it as you would a private key, and keep it out of repositories and chat messages. ## Run your first kubectl command In a terminal on your machine, list the cluster's nodes. Replace the path with the path of the file you downloaded: ```bash kubectl --kubeconfig ~/Downloads/-kubeconfig.yaml get nodes ``` The output lists the control plane node and the worker node, and each one shows `Ready` in the `STATUS` column once it has joined. That answer comes from the cluster's API server, so every other `kubectl` command works the same way. ## Delete the cluster when you finish The control plane is billed from when it is ready until you delete the cluster. Each worker node is billed by the hour while it is up and ready. Delete a test cluster as soon as you are done with it, so that the charges stop. You need the delete permission on Kubernetes. Deleting a cluster removes its control plane, every pool and node, its storage and the volumes on it, and its kubeconfig. Deleting is permanent, so copy out anything you want to keep first. 1. In **Manage Kubernetes Cluster**, open the cluster's **Actions** menu and select **Delete Cluster**. 2. Tick the box that confirms you want to delete the cluster, and select **Delete Cluster**. TIR queues the deletion. The cluster is **Deleting**, then leaves the list. ## What to do next - [Create a Kubernetes cluster](/tir/tir-kubernetes/how-to/create-a-cluster/) explains every choice on the form, including three control plane nodes, committed plans, more pools, and node labels and taints. - [Connect to a Kubernetes cluster](/tir/tir-kubernetes/how-to/connect-to-a-cluster/) shows how to set the `KUBECONFIG` variable so you can drop the `--kubeconfig` flag. It also shows how to deploy a first app. - [Expose services with a load balancer](/tir/tir-kubernetes/how-to/expose-services-with-a-load-balancer/) puts a Service on a public reserved IP. If the cluster ends at **Failed** or `kubectl` cannot reach it, see [Troubleshooting TIR Kubernetes](/tir/tir-kubernetes/troubleshooting/tir-kubernetes/).