The Google Kubernetes Engine (GKE) is a service provided by Google that supports deploying Kubernetes clusters in Google Cloud. GKE has become the default technology when working with Google + Kubernetes due to its ease of use and its integration features with other Google Cloud services.
It is worth mentioning that Kubernetes was actually designed by Google, so although other cloud vendors offer alternative services to Kubernetes in their catalog, Google Cloud focuses on Kubernetes as their container orchestration platform of reference.
In this article, we will show how to create a Kubernetes cluster in GKE using the gcloud command-line tool, and how to deploy a Denodo Kubernetes application in it.
The gcloud command-line tool
The Google Cloud Command Line Interface (gcloud CLI) is a command-line tool that can be used for administering the Google Cloud resources and we will use it extensively in the article, we will assume that it is installed and up to date as a prerequisite for executing the commands presented below.
Although it is also possible to manage the GKE resources from the Google Cloud console, in this article we have chosen to use the gcloud CLI because usually, the commands are self-explanatory and also because it is possible to use these commands and test them easily in any custom Google Cloud deployment.
Google Kubernetes Engine
The Google Kubernetes Engine eases the management, configuration, and daily work of containerized environments in Google Cloud. In other Knowledge Base articles, we explained how to deploy a Denodo container in a local Kubernetes environment and now, we will see how to perform this deployment into a cluster that is hosted in Google Cloud, making use of the Google Cloud Engine.
Note that all the below statements are gcloud CLI commands, they can be copied into any environment to create a Denodo cluster in Google Cloud.
The cluster creation is organized into three main parts:
- (Optional) Creation of the container registry: the Kubernetes cluster will use a Google Container Registry to obtain the container images. This step can be skipped if using Denodo’s Harbor Registry
- Creation of the Kubernetes cluster: the cluster will accept the deployment of the Denodo image.
- Deployment of Virtual DataPort in the cluster: the last step shows the deployment of the Denodo image, explaining the implications of doing this in Google Cloud.
List of Prerequisites
This article assumes that there is an environment already configured to deploy a Docker image of Denodo in GKE, in other cases, there might be needed to install or configure something else before continuing with the next section. In summary:
- The gcloud CLI and a valid Google Cloud account with enough privileges to build all the Google Cloud elements involved in the deployment of a Denodo image.
- If not using the Denodo Harbor Registry, a Docker image of Denodo in the local registry is needed.
- Additionally, it will be easier to configure the deployment file if a local Kubernetes environment is created first, with a tested denodo-service.yaml.
Create the Container Registry
To start with the Google Cloud configuration, open a new console and execute the below Google Cloud commands that will perform the following actions:
Set up your default credentials, zone and project configuration with the command gcloud init from the Google SDK:
$ gcloud init |
Enable the Container Registry API so you can push images to the Container Registry.
$ gcloud services enable containerregistry.googleapis.com |
Configure the credentials of gcloud in your Docker environment so you can push images to the container registry.
$ gcloud auth configure-docker |
Tag the Denodo image and push it. The first image pushed will create the registry in the project, and the corresponding Cloud Storage bucket behind the scenes. To compose the registry URL, you need to replace <PROJECT_ID> with the project ID.
$ docker tag denodo-platform gcr.io/<PROJECT_ID>/denodo-platform $ docker push gcr.io/<PROJECT_ID>/denodo-platform |
You can list the registry to verify that the image is available.
$ gcloud container images list $ gcloud container images list-tags gcr.io/<PROJECT_ID>/denodo-platform |
Create the Kubernetes Cluster
By default, the service account configured on the workers of the GKE cluster can pull images from the Container Registry if it belongs to the same project, so in order to simplify the privileges configuration, we will create all the resources under the same Google Cloud project. In case that you need to use a different project, you can check the Google Container Registry documentation to check what privileges you need to configure.
Create the Kubernetes cluster by providing the name for the cluster and the number of nodes for each of the cluster’s zones.
$ gcloud container clusters create <CLUSTER_NAME> --num-nodes=1 |
The cluster is now running in Google Cloud GKE and we can connect to it with the default Kubernetes CLI kubectl.
In order to do that, we have to install the Kubernetes CLI and configure the connection to the remote cluster in Google Cloud. The latter is done with the gcloud container clusters get-credentials command, where you need to provide the Google Cloud cluster name.
To check if the configuration is successful, connect to the cluster and get the node’s information with kubectl.
$ gcloud container clusters get-credentials <CLUSTER_NAME> $ kubectl get nodes |
Deploying Denodo Virtual DataPort
The Denodo Platform requires a valid license in order to start, which can be obtained from a Denodo License Manager server or in some scenarios (like evaluation or Denodo Express) as a standalone license file. For this example, we will be using Helm Charts to deploy Denodo but for those users that want to use Kubernetes without the abstraction of Helm the on Deploying Denodo in Kubernetes covers it in detail.
The license for Denodo Platform is configured on the license section of the values.yaml file.
Parameter |
Sample Value |
Description |
license.proto |
http/https |
License Manager configuration protocol. With https, it is required to import the correct certificates using the `tls.importCerts` parameter |
license.host |
<hostname> |
License Manager configuration host |
license.port |
10091(by default) |
License Manager configuration port |
Once these values are provided we can deploy the Denodo Platform as usual:
$ helm install denodoplatform oci://harbor.open.denodo.com/denodo-9.0/charts/denodo-platform --version 1.0.4 --values denodo-platform-custom-values.yaml --namespace denodo-platform |
The documentation page Denodo Helm Charts Quick Start Guide has more details about the different options available to deploy Denodo Platform such as Solution Manager Auto Registration or using a Standalone License.
References
Google Kubernetes Engine (GKE)
Google Cloud Container Registry
Deploying Denodo in Kubernetes
How to create your own Docker images for Denodo Platform Containers
The information provided in the Denodo Knowledge Base is intended to assist our users in advanced uses of Denodo. Please note that the results from the application of processes and configurations detailed in these documents may vary depending on your specific environment. Use them at your own discretion.
For an official guide of supported features, please refer to the User Manuals. For questions on critical systems or complex environments we recommend you to contact your Denodo Customer Success Manager.