TKGi
Custom TKGi on GCP environments can be deployed via the UI or API. The currently supported versions can be found by entering an account key into the Create TKGi on GCP
tab of the app, or by using the versions endpoint. At any given time, only 2 versions of TKGi are available from the app.
Using the existing Kubernetes cluster
- Step 1. Download the metadata file from the email labeled “GCP environment: santaclara | Access & Return info”.
- Step 2. Access your cluster. You need to replace santaclara with the name of your environment in the example below.
export TS_G_ENV=santaclara export UAA_ADMIN_PASSWORD=$(jq -r < ~/Downloads/${TS_G_ENV}.json .pks_api.uaa_admin_password) pks login -a api.pks.${TS_G_ENV}.cf-app.com -u admin -p ${UAA_ADMIN_PASSWORD} -k pks get-credentials ${TS_G_ENV}-pks-cluster-1 kubectl cluster-info
The existing Kubernetes cluster is accessed via a DNS entry pointing to the External IP of the master. If you re-create the existing TKGi Cluster, you will need to update the DNS Entry.
- Log into your GCP Console: "Network Services -> Cloud DNS"
- Find the
<env-name>
-zone - Then find the entry for cluster-1.
<env-name>
.cf-app.com.- Update this entry to point to the new External IP of the Master VM. You can find the External IP by looking for the VM labeled with "master".
Creating a custom Kubernetes cluster using the load balancer
If the plan 1 "small" Kubernetes cluster does not address your needs, you can create a custom cluster using the steps below. You can watch a short video showing part of this process on the 'Create PKS on GCP' tab here.
-
Step 1. Create a new plan for your cluster inside the TKGi Tile, we recommend you name it
custom
. You will need to apply changes. -
Step 2. Create a new DNS entry for your
custom
cluster. You should create this your GCP Console under "Cloud DNS".- Recommended name: custom-1.${TS_G_ENV}.cf-app.com
- Recommended IP address value: The pre-created TKGi Load balancer named ${TS_G_ENV}-pks-cluster-1
- The external IP address can be found in the GCP Console: Network Services --> Load Balancing --> click on ${TS_G_ENV}-pks-cluster-1 --> Use the IP address of the "Front End" .
-
Step 3. Download the metadata file from the email labeled “GCP environment: santaclara | Access & Return info”.
-
Step 4. Create a cluster. You need to replace santaclara with the name of your environment in the example below.
export TS_G_ENV=santaclara export UAA_ADMIN_PASSWORD=$(jq -r < ~/Downloads/${TS_G_ENV}.json .pks_api.uaa_admin_password) pks login -a api.pks.${TS_G_ENV}.cf-app.com -u admin -p ${UAA_ADMIN_PASSWORD} -k pks create-cluster ${TS_G_ENV}-pks-custom-1 --external-hostname custom-1.${TS_G_ENV}.cf-app.com --plan large
-
Step 5. Find the info needed to configure your TKGi Cluster Load balancer.
- The network name, which is ${TS_G_ENV}-pcf-network
- The master IP address(es), which are listed from running
pks cluster ${TS_G_ENV}-pks-custom-1
-
Step 6. Configure the load balancer named ${TS_G_ENV}-pks-cluster-1. Use the information from Step 3 above and the documentation in the "Configure Load Balancer Back End" section to configure your load balancer.
-
Step 7. Access your cluster
pks get-credentials ${TS_G_ENV}-pks-custom-1 kubectl cluster-info
Installing the PAS4K8s tile
We put together a quick guide to help fill in the gaps from the official documentation. Here's our first draft. Comments & fixes are welcomed!
Available Plans
There is only one plan available: the product default plan, which is a small, single-master deployment.
Telemetry
Telemetry is enabled on the environments, and is flagged as pivotal-cf-toolsmiths. This is so that data from the internal environments can be viewed separately from data coming from customer installations. Valuable information about cluster creation from test environments is used by the TKGi team to make product decisions.