Google Cloud
This article describes the steps to create a Kubernetes cluster that is managed by Platform9 Managed Kubernetes (PMK) on Google Cloud.
What you’ll need
Access to the inbox of a valid email address.
Google Cloud account with at least 1 active project.
- For this tutorial, we will be using a project named "Platform9 Demo".
- The project will need access to the Google Compute Engine API.
- For this tutorial, we will be using a project named "Platform9 Demo".
Access to a GNU/Linux system/shell/terminal.
Looking to dive deeper? Check out the full Imported GKE Clusters for more extensive, provider-specific information.
Installing and Configuring Local Tools
- Install the Google Cloud CLI.
# Add the Cloud CLI distribution URI as a package source
$ echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-cli main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# Import the Google Cloud Platform public key
$ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
# Update the package list and install the Cloud SDK
$ sudo apt-get update && sudo apt-get install google-cloud-cli
- Configure the CLI to use your Google Cloud credentials.
$ gcloud init
- Select the default project for the CLI.
You are logged in as: [mike@gmail.com].
Pick cloud project to use:
[1] platform9-demo-274119
[2] Create a new project
Please enter numeric choice or text value (must exactly match list item):
- Select the first option (which matches the project we created for the demo).
- To make it easier to provision new compute resources, set the default zone.
$ gcloud config set compute/zone us-west1-a
Creating Virtual Machine (VM) Instance
- List the public images available on the Google Compute Engine.
$ gcloud compute images list
- Based on the previous output, identify the image for
Ubuntu 18.04 LTS
(which we'll use in this example), and create a VM instance with the namedemo-cluster-1
.
$ gcloud compute instances create demo-cluster-1 \
--image-family ubuntu-1804-lts \
--image-project ubuntu-os-cloud
Created [https://www.googleapis.com/compute/v1/platform9-demo-274119/zones/us-west1-a/instances/demo-cluster-1].
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
Demo-cluster-1 us-west1-a n1-standard-1 10.138.0.2 35.233.254.6 RUNNING
Note: record the EXTERNAL_IP
as we'll need it in a few steps.
- Establish an SSH connection to the VM instance.
gcloud compute ssh demo-cluster-1
This command creates the necessary SSH keys, and logs you into the instance. The username is the same name you used to log into the terminal from which you’re working.
mike@demo-cluster-1:~$
Attach VM Instance to Platform9
- From your PMK Dashboard, select "My Infrastructure".

- Select "Existing Virtual or Physical Infrastructure".

This area will give you direction about how to load our CLI on the VM instance you are SSH'd in to. You then configure the CLI to talk back to your PMK instance.
Note: when running the pf9ctl config set
command, you will be prompted to provide your account credentials which were established earlier.
The pf9ctl prep-node
command will install your customized PF9 agent and begin promoting the VM as a PMK node. The node will show up in the UI shortly after completion.
✓ Loaded Config Successfully
✓ Missing package(s) installed successfully
✓ Removal of existing CLI
✓ Existing Platform9 Packages Check
✓ Required OS Packages Check
✓ SudoCheck
✓ CPUCheck
x DiskCheck - At least 30 GB of total disk space and 15 GB of free space is needed on host. Disk Space found: 2 GB
x MemoryCheck - At least 12 GB of memory is needed on host. Total memory found: 4 GB
✓ PortCheck
✓ Existing Kubernetes Cluster Check
✓ Completed Pre-Requisite Checks successfully
Optional pre-requisite check(s) failed. Do you want to continue? (y/n)
Debugging
If you encounter the message: Failure to prepare node
, please review the pf9ctl
log file for additional context.
Enterprise – Please submit a Support Request with the log attached and our team will review and work with you to onboard the node.