CF-for-k8s
cf-for-k8s is a deployment_type
that can only be claimed from the shared pool. The UI does not support manging this type of environment, but does show the status of the environment. A cf-for-k8s environment is complete with a Cloud Foundry instance. You should be able to immediately kubectl cluster-info
and cf login
after your environment finishes deploying. The kubernetes based environments are provisioned via Tanzu Mission Control (TMC) which are Tanzu Kubernetes Grid clusters running on AWS.
Claiming a cf-for-k8s environment
cf-for-k8s environments are available in a shared pool named cf-for-k8s
. More information on shared pools can be found here.
How do I get the metadata file for my environment?
The metadata file schema is defined here. To get the metadata file for a CF-for-k8s environment, use this endpoint or use the concourse resource.
It is recommend to send the metadata to a file, and then extract the kubeconfig information if needed.
export TOOLSMITHS_API_TOKEN=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
export TS_G_ENV=name-of-metadatafile
curl "https://environments.toolsmiths.cf-app.com/pooled_engineering_environments/claim?api_token=$TOOLSMITHS_API_TOKEN&environment_name=$TS_G_ENV" | jq .
How do I interact with the Kubernetes Cluster?
First, ensure you have the metadata file using the instructions above. Then use the commands below.
export TS_G_ENV=name-of-metadatafile
jq -r .kubernetes_kubeconfig < ${TS_G_ENV}.json > /tmp/${TS_G_ENV}-kubeconfig.yml
kubectl cluster-info --kubeconfig /tmp/${TS_G_ENV}-kubeconfig.yml
How do I login to my Cloud Foundry?
First, export the metadata file named $TS_G_ENV.json
using the instructions above. Then, use the commands below. You will need to pull the cf admin password out of credhub, and then login. You need to replace santaclara with the name of your checked out environment in the example below.
-- cf login example:
export TS_G_ENV=name-of-metadatafile
export CF_PASSWORD=$(jq -r < ${TS_G_ENV}.json .cf_admin_password)
export CF_USERNAME=admin
cf api --skip-ssl-validation api.${TS_G_ENV}.cf-app.com
cf auth
cf target
What version of CF-for-k8s will I get?
In general, you should be getting the latest tagged release off of master. The tagged version can be found in the metadata file.
Creating a Custom environment using the deployment_type of CF-for-k8s [Not implemented]
Custom cf-for-k8s environments are not available at this time, given this would require every user to have:
- API Access to the Toolsmiths Environment Management App
- An Org on Tanzu Mission Control with API access
- An AWS Account connected to your TMC account
API Access to the Toolsmiths Environment Management App is available via this doc
An Org on Tanzu Mission Control can be created via a HelpNOW ticket. A TMC API Token can be created via the VMware Cloud Services Portal. after your TMC Org has been created.
An AWS Account can be created via a HelpNOW ticket. Instructions for connecting your AWS account to your TMC Org are in the TMC console, and can also be found here
Then you will need to create and environment using the API. After your environment has been created, you can use the commands below to use your environment.