Connect to Your Platform
Next we need to jump into our terminals and connect to the Platform we just created. Under the hood Platforms are powered by a hosted Crossplane instance, and Workspaces are powered by namespaces inside of it, so we can connect to it like we would any remote Kubernetes cluster.
We're going to need to connect to the Crossplane instance powering our Platform in this guide, so we need an API Token. To generate one, click on the Organization switcher and select "My Account". From there, navigate to "API Tokens" and click on "Create New Token". We're going to name our new Token
Make sure to copy the token string and store it somewhere safe like a password manager. This is the last time Upbound Cloud will display it to you.
Now you're ready to connect to Crossplane. If you're not familiar with connecting to a remote cluster, Upbound Cloud gives you the commands you need to connect to your Platform.
Just navigate to your Platform, view Global Resources and click "Connect via CLI".
Next copy and paste those commands into your terminal while filling out the appropriate values:
Set the cluster in your kubeconfig file
kubectl config set-cluster "dev" --server="<URL-TO-PLATFORM>"
Use your Access Token to authentcate with your Platform
kubectl config set-credentials "<ORGANIZATION>" --token=[ACCESS_TOKEN]
Add a new entry for this context to your kubeconfig file
kubectl config set-context "dev" --cluster="<PLATFORM NAME>" --user="<ORGANIZATION>"
Use this context as your current context
kubectl config use-context "<PLATFORM NAME>"
- Configure Your Platform using kubectl and our example configuration found in Upbound Registry
To learn about some of these topics we covered in more detail, please see the resources below.