This guide walks you through deploying your first Kubernetes cluster on CTO2B. You'll learn how to create your first environment and deploy a simple Hello World Python application. We will also explore CTO2B’s key features, like accessing your Kubernetes cluster via the Teleport CLI, how to clone an application, and create a database.
To access CTO2B, sign in to the platform using your credentials.

Caption: Sign in to CTO2B using your credentials to access the main dashboard.
When you first log into CTO2B, the Environments dashboard is the main area you'll see. It lists all your Kubernetes environments that are monitored by Sview agents. Each environment shows its name, stage (such as dev or prod), and current health status, with clear indicators like "Healthy" or "Unhealthy." You can also track compliance, maintenance, and any ArgoCD health issues for each environment. The dashboard allows you to filter by cloud provider, stage, or focus specifically on unhealthy environments.
Step 1 - On the dashboard page, click New in the upper right corner to create your Kubernetes cluster.

Caption: This is your CTO2B dashboard, where you manage Kubernetes environments, applications, and data services
Step 2—Select your preferred environment from the available options. Depending on where you want to deploy your Kubernetes cluster, you can choose from GCP, AWS or AZURE.
When you select a cloud provider, a pre-filled Helm configuration section with default settings will appear. These include storage size, networking configurations, and other variables based on the provider. Adjust the values as needed before proceeding. Explore the base deployment documentation for a detailed list of value options available for each cloud provider.

Caption: Here, we're setting up a Kubernetes cluster on AWS and customizing Helm values for networking and storage.
Step 3 - After selecting your environment, fill in the Stage and Environment fields:
Step 4—After customizing the Helm values, click Save to create your cluster. Once you click save, the platform redirects you to the Deployments page. Here, you can see the newly created environment listed and its current status. In this case, the status shows as "Pending changes," indicating that the deployment process is in progress.

Caption: The environment is created and visible on the Deployments page with a status of "Pending changes."
When you click on the deployment entry, you are taken to a detailed view of the deployment process. This page provides information on the Helm repository, the namespace, and the chart path for the deployment. You can track the logs by clicking on the View Logs button to monitor the status of your Terraform plan.

Caption: The deployment detail page shows the Terraform plan in progress.
After the deployment progresses, the page will show all the resources that have been created, such as Persistent Volume Claims, Pods, and other Kubernetes resources. The health status for each resource is displayed, and you can monitor the approval status for infrastructure changes. All the artifacts created during the deployment, such as Terraform logs, are also available for review. Environment creation can take up to 30 minutes.


Caption: Now the environment is ready
Step 5 - Once all resources are created, the environment will be listed in the Environments dashboard. Now, your environment is ready for use.
From the left-side navigation, click on Deployments. Then click New at the top-right of the screen to create a new deployment. Choose your target environment. Scroll down and select Python Application from the list of available templates. Adjust the Helm values to fit your application's requirements. After adjusting the values, click Save. CTO2B will automatically create all necessary Kubernetes resources, including pods, services, certificates, and ingress.
The deployment overview page shows the application name, status, and a link to view logs. The Helm Repo, Namespace, and Chart Path provide deployment details. The All Resources section lists created Kubernetes resources, and the Vulnerabilities section highlights any critical CVEs, giving insight into the deployment's security.
Once your deployment is complete, you can find the application's URL for access under the Ingresses section, as shown below:

CTO2B uses Teleport to provide secure access to Kubernetes clusters. Before logging in and accessing your clusters, you must install the Teleport CLI (tsh).
Once the CLI is installed, use the following command to log in securely to your Kubernetes cluster via Teleport. Replace and <proxy_url> with your credentials and the CTO2B proxy URL:
tsh login --user <username> --proxy <proxy_url>
After logging in, you can list and access your Kubernetes environments using:
tsh kube ls
tsh kube login <cluster_name>
Expected output for the cluster list:
Kube Cluster Name Labels Selected
------------------ ----------------------------------------------------- --------
demo-dev-awsdemo cloud=aws,environment=awsdemo,stage=dev,tenant=demo
To switch to the desired cluster:
tsh kube login demo-dev-awsdemo
Once logged in, use kubectl to manage and view the resources in your cluster. For example, to list Ingresses:
kubectl get ingress
dev-awsdemo-5f44-demo-pythonapp-app-k8s-python <none> pythonapp.demo.cto2b.eu <aws-elb-url> 80, 443 27h
Finally, check the application response via curl:
curl -sI https://pythonapp.demo.cto2b.eu | grep -E "HTTP/2|date:|content-type:"
Expected output:
HTTP/2 200
date: Wed, 11 Sep 2024 15:18:36 GMT
content-type: text/html; charset=utf-8
CTO2B makes it easy to clone applications within an environment.
To clone an application:
...) under Actions.CTO2B will automatically create a new deployment based on the cloned configuration.