Hi,
I’m trying to create a shell script that has only one parameter, a target ID.
This is for creating a new Kubernetes connection via boundary connect kube
. The script has all the “magic” inside and the result should be that it configures the kubectl context and creates a new boundary proxy connection ready to use.
I can fetch the ca_crt
and the service_account_token
from the POST v1/target/{id}/authorize-session
API call. From that I get the session_id
among other response fields but I don’t know how to create the actual listening connection with a proxy port from here.
I can run and it works.
boundary connect -listen-port=44444 -target-id ttcp_xxx
It opens a new listening connection but I’d like to get the CA and token from that session first to build the kube context and then start the proxy connection to be able to connect to it with that credentials using the HTTP API.
Is there a way to do that?
PS: I read this How to Connect to Kubernetes Clusters Using Boundary post and it was very helpful but I don’t want to manually configure or use the Desktop App to connect to a k8s cluster.
Thanks!