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 GCP and Kublr

  1. Log into Kublr using your credentials.
  2. Click on the Credentials menu in the left navigation menu bar. Credentials
  3. Click Add Credentials Add Credentials
  4. Select GCP Credentials in the drop-down selector field . Credentials Type Dropdown
  5. Enter Credentials Name (e.g. gcp-credentials).
  6. Copy and paste the Project ID which can be found in the JSON key file that was downloaded earlier.
  7. Copy and paste the Client Email which can be found in the JSON key file that was downloaded earlier.
  8. Copy and paste the Private Key which can be found in the JSON key file that was downloaded earlier.
  9. After the form is complete click Save Credentials at the bottom right. You should see a success notification if everything is correct. Success Adding Credentials
  10. To verify that the credentials are valid click the Verify Credentials Button button. Credential
  11. You should see a success notification, indicating that the credentials are valid. Verify Credentials Success

Create a GCP Cluster with Kublr

  1. Click on Cluster Menu in the left navigation menu bar Cluster Menu
  2. Click on Add Cluster Add New Cluster
  3. Enter cluster name Cluster Name
  4. Select the Google Cloud Platform provider GCP Provider
  5. Select the credentials created earlier Select Credentials
  6. Select Region Select Region
  7. Select the operating system to be used for Kublr cluster instances Select OS
  8. Select the number of master nodes and instance type Select Instance Type
  9. Select the number of worker nodes and instance type Select Work Nodes
  10. Click Cnfirm and Install at the bottom right of the screen.
  11. If everything was entered correctly a congratulations notification will be displayed on the screen. Cluster Created

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 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}
  2. Open a browser to http://%hostname%/admin, where %hostname% is the hostname you got from the kubectl

  3. Decode admin password with

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