Skip to content

Get started with TIR Kubernetes

View as Markdown

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 first.
  • A role that lets you create Kubernetes clusters in the project, such as Project Lead. See Roles and permissions.
  • On a prepaid account, enough credit for the plans you pick.
  • kubectl on your own machine. See the Kubernetes install guide.
  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.

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.

In a terminal on your machine, list the cluster’s nodes. Replace the path with the path of the file you downloaded:

kubectl --kubeconfig ~/Downloads/<cluster-name>-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.

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.

If the cluster ends at Failed or kubectl cannot reach it, see Troubleshooting TIR Kubernetes.