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.
We’ll outline the needed steps to create a Kubernetes cluster on GCP with Kublr. Then, we’ll deploy a simple application (WordPress).
Log into Kublr using your credentials.
On the left menu, click Credentials.
Click Add Credentials.
The ADD CREDENTIALS dialog is displayed.
In the ADD CREDENTIALS dialog, set Credentials Type to “GCP Credentials”. The dialog is updated to display the Google Cloud Platform credentials specific fields.
Enter Credentials Name.
Set:
Click Save Credentials. The “Credentials have been successfully created.” popup is displayed.
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.
Click Ok.
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:
On the left menu, click Clusters.
Click Add Cluster.
The Select Installation Type dialog is displayed.
In the Select Installation Type dialog, click Cluster.
Click Continue Setup.
The ADD CLUSTER dialog is displayed.
In the ADD CLUSTER dialog, set Provider to “Google Cloud Platform”.
From the Credentials list, select previously created GCP credentials.
If credentials were not created previously, use Add New Credentials.
Specify Cluster Name.
Set:
If necessary, expand the Advanced Options and set them.
Click the INSTANCES
step.
Use the Master Configuration
section.
Specify the parameters of the master node(s) of your cluster as described below.
Select Instance Type from the list.
From the Masters list, select the number of master or management nodes in correspondence with the selected Instance Type.
From the Operating System list, select the host OS for virtual machines in the cluster.
Optionally, select Public SSH Key from the list.
If necessary, expand the Advanced Options and set them.
Scroll to the Instance Group
section (default name group1
).
Specify the parameters of the work node(s) in your group as described below.
Select Instance Type from the list.
To select the number of work nodes in a group, do one of the following:
From the Operating System list, select the host OS for virtual machines in the cluster.
Optionally, select Public SSH Key from the list.
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.
If necessary, expand the Advanced Options and set them.
Optionally, click the FEATURES
step.
If necessary, add features to your cluster, specifying parameters under:
Click the REVIEW & CREATE
step.
Review your cluster parameters.
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.”
In the notification window, click OK.
Your new cluster page is displayed on the Events tab showing the cluster creation progress.
For more details, please refer to the official Kubernetes documentation
For Mac users:
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
For Windows users:
To retrieve the config from Kublr:
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 Helm Click here for detailed guidelines.
For Mac users:
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh
chmod +x get_helm.sh
./get_helm.sh --version v2.9.1
For Windows users:
Initiate and test your Helm installation:
helm init
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)
Open the browser and navigate to the URL from console output.
For Windows users:
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}