Going Hybrid with Kubernetes on Google Cloud Platform and Nutanix
Kubernetes and Container Engine
Hybrid cloud allows organizations to run a variety of applications either on-premise or in the public cloud. With this approach, enterprises can:
- Increase the speed at which they're releasing products and features
- Scale applications to meet customer demand
- Move applications to the public cloud at their own pace
- Reduce time spent on infrastructure and increase time spent on writing code
- Reduce cost by improving resource utilization and compute efficiency
Hybrid cloud deployments can help deliver the security, compliance and compute power you require with the agility, flexibility and scale you need. Our hybrid cloud example will encompass three key components:
- On-premise: Nutanix infrastructure
- Public cloud: Google Cloud Platform (GCP)
- Open source: Kubernetes and Containers
Google’s experience running our own container-based internal systems inspired us to create Kubernetes, and Google Container Engine, an open source and Google Cloud managed platform for running containerized applications across a pool of compute resources. Kubernetes abstracts away the underlying infrastructure, and provides a consistent experience for running containerized applications. Kubernetes introduces the concept of a declarative deployment model. In this model, an ops person supplies a template that describes how the application should run, and Kubernetes ensures the application’s actual state is always equal to the desired state. Kubernetes also manages container scheduling, scaling, health, lifecycle, load balancing, data persistence, logging and monitoring.
In a first phase, the Google Cloud-Nutanix partnership focuses on easing hybrid operations using Nutanix Calm as a single control plane for workload management across both on-premises Nutanix and GCP environments, using Kubernetes as the container management layer across the two. Nutanix Calm was recently announced at Nutanix .NEXT conference and once publicly available, will be used to automate provisioning and lifecycle operations across hybrid cloud deployments. Nutanix Enterprise Cloud OS supports a hybrid Kubernetes environment running on Google Compute Engine in the cloud and a Kubernetes cluster on Nutanix on-premises. Through this, customers can deploy portable application blueprints that run on both an on-premises Nutanix environment as well as in GCP.
Let’s walk through the steps involved in setting up a hybrid environment using Nutanix and GCP.
The steps involved are as follows:
- Provision an on premise 4-node Kubernetes cluster using a Nutanix Calm blueprint
- Provision a Google Compute Engine 4-node Kubernetes cluster using the same Nutanix Calm Kubernetes blueprint, configured for Google Cloud
- Use Kubectl to manage both on premise and Google Cloud Kubernetes clusters
- Using Helm, we’ll deploy the same Wordpress chart on both on premise and Google Cloud Kubernetes clusters
Provisioning an on-premise Kubernetes cluster using a Nutanix Calm blueprintYou can use Nutanix Calm to provision a Kubernetes cluster on premise, and Nutanix Prism, an infrastructure management solution for virtualized data centers, to bootstrap a cluster of virtualized compute and storage. This results in a Nutanix managed pool of compute and storage that's now ready to be orchestrated by Nutanix Calm, for one-click deployment of popular commercial and open source packages.
You can then select the Kubernetes blueprint to target the Nutanix on-premise environment.
The Calm Kubernetes blueprint pictured below configures a four-node Kubernetes cluster that includes all the base software on all the nodes and the master. We’ve also customized our Kubernetes blueprint to configure Helm Tiller on the cluster, so you can use Helm to deploy a Wordpress chart. Calm blueprints also allow you to create workflows so that configuration tasks can take place in a specified order, as shown below with the “create” action.
Now, launch the Kubernetes Blueprint:
After a couple of minutes, the Kubernetes cluster is up and running with five VMs (one master node and four worker nodes):
Provisioning a Kubernetes cluster on Google Compute Engine with the same Nutanix Calm Kubernetes blueprintUsing Nutanix Calm, you can now deploy the Kubernetes blueprint onto GCP. The Kubernetes cluster is up and running on Compute Engine within a couple of minutes, again with five VMs (one master node + four worker nodes):
You’re now ready to deploy workloads across the hybrid environment. In this example, you'll deploy a containerized WordPress stack.
Using Kubectl to manage both on-premise and Google Cloud Kubernetes clustersKubectl is a command line interface tool that comes with Kubernetes to run commands against Kubernetes clusters.
You can now target each Kubernetes cluster across the hybrid environment and use kubectl to run basic commands. First, ssh into your on-premise environment and run a few commands.
Using Helm, you can deploy the same WordPress chart on both on-premise and Google Cloud Kubernetes clustersThis example uses Helm, a package manager used to install and manage Kubernetes applications. In this example, the Calm Kubernetes blueprint includes Helm as part of the cluster setup. The on-premise Kubernetes cluster is configured with Nutanix Acropolis, a storage provisioning system, which automatically creates Kubernetes persistent volumes for the WordPress pods.
Let’s deploy WordPress on-premise and on Google Cloud:
Then, you can run a few kubectl commands to browse the on-premise deployment.
This on-premise environment did not have a load balancer provisioned, so we used the cluster IP to browse the WordPress site. The Google Cloud WordPress deployment automatically assigned a load balancer to the WordPress service along with an external IP address.
- Nutanix Calm provided a one-click consistent deployment model to provision a Kubernetes cluster on both Nutanix Enterprise Cloud and Google Cloud.
- Once the Kubernetes cluster is running in a hybrid environment, you can use the same tools (Helm, kubectl) to deploy containerized applications targeting the respective environment. This represents a “write once deploy anywhere” model.
- Kubernetes abstracts away the underlying infrastructure constructs, making it possible to consistently deploy and run containerized applications across heterogeneous cloud environments