Create a Kubernetes cluster on GCP with Kublr


An existing Google Cloud Platform account is required before you proceed.

To deploy a cluster in your Google Cloud Platform (GCP) account with Kublr, you’ll need to create a GCP service account and a private key.

  1. Log in to your Google Cloud Platform Console.
  2. On the top left click Expand to expand the menu.
  3. In the menu click IAM & admin.
  4. On the IAM & admin page select Service Accounts on the left menu and click Create Service Account at the top of the page.
  5. Fill out the form, click Furnish a new private key, and choose JSON. Furnish a New Private Key
  6. Click the Save button. Your JSON key will be downloaded and placed in your downloads directory. This file will be necessary to add your credentials to Kublr.


We’ll outline the needed steps to create a Kubernetes cluster on GCP with Kublr. Then, we’ll deploy a simple application (WordPress).

  1. Deploy a Kublr cluster on GCP .
  2. Open the deployed Kublr Cluster.
  3. Configure kubectl.
  4. Deploy WordPress through Helm.

Connect Kublr and create GCP Cluster

Connect GCP and Kublr

  1. Log into Kublr using your credentials.

  2. On the left menu, click Credentials.

  3. Click Add Credentials. Add Credentials The ADD CREDENTIALS dialog is displayed.

  4. In the ADD CREDENTIALS dialog, set Credentials Type to “GCP Credentials”. The dialog is updated to display the Google Cloud Platform credentials specific fields.

  5. Enter Credentials Name.

  6. Set:

    • Project ID
    • Client Email
    • Private Key Add Credentials GCP
  7. Click Save Credentials. The “Credentials have been successfully created.” popup is displayed.

  8. To verify if credentials are valid and ready to be used, mouse over the created credentials and click the displayed Test button.

    Verification success popup will be displayed.

  9. Click Ok.

Create GCP Cluster with Kublr

Powered by Kublr, Vanilla Kubernetes Cluster does not include any advanced Kublr features, suitable for running workloads.

See some cluster parameters description here.

To add a new cluster:

  1. On the left menu, click Clusters.

  2. Click Add Cluster. Add New Cluster The Select Installation Type dialog is displayed.

  3. In the Select Installation Type dialog, click Cluster.

  4. Click Continue Setup. Installation Type - Cluster The ADD CLUSTER dialog is displayed.

  5. In the ADD CLUSTER dialog, set Provider to “Google Cloud Platform”.

  6. From the Credentials list, select previously created GCP credentials.

    If credentials were not created previously, use Add New Credentials.

  7. Specify Cluster Name.

  8. Set:

    • Region
    • Kublr Agent
    • Kubernetes Version GCP-Add Cluster-General Settings
  9. If necessary, expand the Advanced Options and set them.

  10. Click the INSTANCES step.

  11. Use the Master Configuration section.

  12. Specify the parameters of the master node(s) of your cluster as described below.

  13. Select Instance Type from the list.

  14. From the Masters list, select the number of master or management nodes in correspondence with the selected Instance Type.

  15. From the Operating System list, select the host OS for virtual machines in the cluster. Add Cluster-Master Configuration

  16. Optionally, select Public SSH Key from the list.

  17. If necessary, expand the Advanced Options and set them.

  18. Scroll to the Instance Group section (default name group1).

  19. Specify the parameters of the work node(s) in your group as described below.

  20. Select Instance Type from the list.

  21. To select the number of work nodes in a group, do one of the following:

    • In the Nodes field, set the number of work nodes.
    • Select the Auto-Scaling option, and then set the Min Nodes and Max Nodes limitations.
  22. From the Operating System list, select the host OS for virtual machines in the cluster.

  23. Optionally, select Public SSH Key from the list.

  24. If necessary, set your own name for the instance group.

    Note You can also clone or delete the current instance group, or add another one. Instance Group-Operations

  25. If necessary, expand the Advanced Options and set them.

  26. Optionally, click the FEATURES step.

  27. If necessary, add features to your cluster, specifying parameters under:

    • Ingress Controller
    • Self-Hosted Logging
    • Self-Hosted Monitoring GCP-Add Cluster-Features Configuration
  28. Click the REVIEW & CREATE step.

  29. Review your cluster parameters.

  30. At the bottom of the dialog, click CONFIRM AND INSTALL.

    A notification is displayed “Your cluster is being created. It might take a few minutes.”

  31. In the notification window, click OK.

    Your new cluster page is displayed on the Events tab showing the cluster creation progress.


Install and Configure kubectl

For more details, please refer to the official Kubernetes documentation

For Mac users:

curl -LO$(curl -s
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl

For Windows users:

  1. Download
  2. Include the path with the kubectl executable to PATH environment variable. More details:
  3. See additional information here

Copy the KubeConfig File

To retrieve the config from Kublr:

  1. Click on the GCP cluster to access the cluster details page
  2. On the overview tab, download the config file.

For Mac users:

mkdir ~/.kube
cp ~/Downloads/config.yaml ~/.kube/config

For Windows users:

cd %HOME%
mkdir .kube
copy %HOME%\Downloads\config.yaml .kube\config

Check that kubectl is working and using right config file:

kubectl config view
kubectl cluster-info


Install and Use Helm to Deploy WordPress to Your Cluster

Install Helm Click here for detailed guidelines.

For Mac users:

curl >
chmod +x
./ --version v2.9.1

For Windows users:

  1. Download Helm version 2.9.1 from here:
  2. Extract to the directory where kubectl is saved

Initiate and test your Helm installation:

helm init

Install WordPress

NOTE: It may take a few minutes for the LoadBalancer IP to become available.

helm install stable/wordpress --name wordpress

For Mac users:

export SERVICE_IP=$(kubectl get svc --namespace default wordpress-wordpress -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
echo http://$SERVICE_IP/admin
echo Username: user
echo Password: $(kubectl get secret --namespace default wordpress-wordpress -o jsonpath='{.data.wordpress-password}' | base64 --decode)

Install helm output Open the browser and navigate to the URL from console output.

For Windows users:

  1. Run the following to get a hostname and password:
kubectl get svc --namespace default wordpress-wordpress -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'
kubectl get secret --namespace default wordpress-wordpress -o jsonpath='{.data.wordpress-password}
  1. Open a browser to http://%hostname%/admin, where %hostname% is the hostname you got from the kubectl
  2. Decode admin password with

Congrats! You just deployed your first app in a Kubernetes cluster with Kublr.