CTO2B uses access management solution Teleport to provide secure access to Kubernetes clusters. Follow the steps below to install and set up Teleport on your system. Installing Teleport.
Prerequisites:
Current CTO2B application version is supporting Teleport v16.4.12
Visit the official Teleport releases page. And download the appropriate Teleport binary for your OS (currently CTO2B application supports version v16.4.12).
curl https://cdn.teleport.dev/install-v16.4.12.sh | bash -s ${TELEPORT_VERSION?} ${TELEPORT_EDITION?}
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