How to create a Kubernetes clusters on the GCP web console?
This blog will focus on using the GCP webconsole to build, deploy and expose and application on the Google Kubernetes Enginer (GKE). In this demo we will be installing an application called OwnCloud.
Log into GCP and choose your project
Go to Kubernetes Engine > Clusters > Create Cluster
Choose a name for your cluster and select regional or zonal for your GKE cluster location. Select your region and version of Kubernetes.
Scroll down to the node pool section. This is the compute backend that will run your cluster. Choose the number of nodes you want, and the machine type. You can also choose GPU if required.
Click on the Advanced Edit button. Here you can enable auto-scaling, choose the minimum and maximum of cluster nodes. You can also choose the Operating system of your cluster.
Choose a name for the node pool.
In this example I will enable auto scaling and set 2 nodes as my minimum and 6 nodes as my maximum. I have also enabled pre-emptible nodes
The remaining options can be left as default and click save
click advanced to view additional configuration options. Once you are happy click create
The cluster will now build – this may take a few minutes
You now have your cluster, you can click on the cluster name to explore the information about it.
Next we need to add a workload to make the cluster do something.
From the Kubernetes Engine select Workloads > Deploy
In section 1 – Type owncloud/server as the container image path. This will automatically pull the image from docker.
Click done and continuewhen ready
In Section 2 – enter a name for you application and once happy click deploy (at the bottom of the screen)
The Deployment will now start. Please note OwnCloud will take up to 5 minutes to deploy
Goto the Workloads pane and you should see the deployment running.
Now we need to expose the service to make it publicly available
You can click the Expose button at the top of the deployment page.
Type Port 80 and target port 8080 and click Expose
Click on the Services pane and you should see an endpoint IP address
Copy the IP and port into your web browser and the OwnCloud page should open
If you a demoing this at the same time, make sure you delete your resources if not needed to avoid being charged by google.