We have updated our Privacy Policy, effective from 25 September 2024. It’s available here

< BLOG HOME

Getting Started with Mirantis Kubernetes Engine on Google Cloud Platform (GCP)

Hyung Rae Kim - October 25, 2022
image

We recently released Mirantis Kubernetes Engine (MKE) 3.6, which features support for Google Cloud Platform (GCP). In this blog, we will cover a little background on Google Cloud Platform and Mirantis Kubernetes Engine, the benefits of using MKE on GCP, and details on how to install and run MKE on GCP.  

Choice of Cloud Offering 

The need to address scalability, ensure application availability, and manage cost has led many businesses to leverage public cloud in conjunction with on-prem infrastructure as part of their IT strategies. By augmenting their existing on-prem infrastructure with public cloud, businesses have been able to improve innovation, cut costs and increase agility.

No two cloud deployments are alike - various models, types, and services have emerged to cater to the specific needs of different users. Mirantis provides an automated way to install and configure Mirantis Kubernetes Engine across public, private, hybrid, and multi-cloud deployments. These environments include:

  • Google Cloud Platform (GCP)

  • Amazon (AWS)

  • Microsoft Azure 

  • Equinix Metal for hosted bare-metal

  • VMware for bare metal for on-prem infrastructure

Installing MKE on GCP using Mirantis Launchpad

Mirantis provides a tool called Mirantis Launchpad, which makes it easy to install MKE on cloud providers such as GCP. Mirantis also provides example Terraform scripts to create the resources needed to run MKE for a variety of cloud providers, including GCP.

Prerequisites

  1. An account and credentials for GCP

  2. Install Launchpad (instructions here)

  3. Install Terraform

  4. Authenticate Terraform provider: https://github.com/Mirantis/launchpad/tree/master/examples/terraform/gcp#authentication

Create the infrastructure

  1. Checkout this repo containing Terraform scripts:
    git clone git@github.com:Mirantis/launchpad.git

  2. cd launchpad/examples/terraform/gcp

  3. Create the terraform.tfvars file with needed details. You can use the provided terraform.tfvars.example as a baseline.

    Sample terraform.tfvars content:

cluster_name         = "demo-gcp"
manager_count        = 1
msr_count            = 0
worker_count         = 2
windows_worker_count = 0
admin_password       = "DemoMke@gcp!"
mke_version          = "3.6.0"
vpc_mtu              = 1500

4. Create resources on GCP

terraform apply

5 . terraform output -raw mke_cluster > ./launchpad.yaml

This will create a launchpad.yamlfile with content similar to:

"apiVersion": "launchpad.mirantis.com/mke/v1.3"
"kind": "mke"
"spec":
  "hosts":
  - "privateInterface": "ens4"
    "role": "manager"
    "ssh":
      "address": "34.134.216.166"
      "keyPath": "./ssh_keys/demo-gcp.pem"
      "user": "ubuntu"
  - "privateInterface": "ens4"
    "role": "worker"
    "ssh":
      "address": "34.170.197.170"
      "keyPath": "./ssh_keys/demo-gcp.pem"
      "user": "ubuntu"
  - "privateInterface": "ens4"
    "role": "worker"
    "ssh":
      "address": "35.184.137.244"
      "keyPath": "./ssh_keys/demo-gcp.pem"
      "user": "ubuntu"
  "mke":
    "adminPassword": "DemoMke@gcp!"
    "adminUsername": "admin"
    "installFlags":
    - "--default-node-orchestrator=kubernetes"
    - "--san=34.135.7.233"
    "version": "3.6.0"
  "msr": {}

Install MKE

Update launchpad.yaml to use MCR 20.10.13. Add a new spec.mcr section to launchpad.yaml:

…
"mcr":
  "version": "20.10.13"

For full GCP integration, add the --cloud-provider=gce  the installFlags section of the launchpad.yaml

...
"mke":
    "adminPassword": "DemoMke@gcp!"
    "adminUsername": "admin"
    "installFlags":
    - "--default-node-orchestrator=kubernetes"
    - "--san=34.135.7.233"
    - "--cloud-provider=gce"
    "version": "3.6.0"

Now that the infrastructure is ready, install MKE using;

launchpad apply

This command will use the previously created  launchpad.yaml file to install MKE.

After installation is finished, it should display the admin URL for MKE:

INFO ==> Running phase: MKE cluster info
INFO Cluster is now configured.
INFO MKE cluster admin UI: https://34.134.216.166/
INFO You can download the admin client bundle with the command 'launchpad client-config'

Once MKE is successfully installed, your Google Cloud Platform interface should look like this:

Cleanup

To destroy the cluster, run:

terraform destroy

This command deletes all the resources created in GCP.

GCP support limitations

Be aware of the following limitations in the MKE support for GCP:

The use of Windows ServerCore with Containers images will prevent kubelet from starting up, as these images are not compatible with GCP. Workaround: Use Windows Server or Windows Server Core images.
Communication between GCP VPCs and Docker networks that use Swarm overlay networks will fail if their MTU values are not manually aligned. By default, the MTU value for GCP VPCs is 1460, while the default MTU value for Docker networks is 1500. ​​Workaround: Select from the following options: - Create a new VPC and set the MTU value to at least 1500. - Set the MTU value of the existing VPC to at least 1500. For more information, refer to the Google Cloud Platform documentation

Installing Mirantis Kubernetes Engine on Google Cloud Platform is quick and easy, and provides you with the ability to deploy your container workloads on additional public cloud environments.  With MKE, you get the power of choice--not just in terms of cloud infrastructure, but in other areas, such as your choice of orchestrator--enabling you to choose between Kubernetes and Swarm, or both.  

Mirantis Kubernetes Engine can provide immediate value to your business by giving you the power of choice. You can learn more about Mirantis Kubernetes Engine on our website, or check out the product documentation for deeper details. 

To get started, try our free trial or contact us to learn more about how MKE can benefit you.

 

Webinar: Getting Started with Mirantis Kubernetes Engine on Google Cloud Platform (GCP)

Nov 16, 2022.

Why have so many businesses gone through the trouble of creating hybrid cloud environments? And does it have to be that hard? Adding a public cloud component to your on-prem infrastructure gives you scalability and ensures application availability, and keeping some portion of your infrastructure on-prem helps to manage cost. It's not easy, but it helps you improve innovation, cut costs and increase agility.

 

Choose your cloud native journey.

Whatever your role, we’re here to help with open source tools and world-class support.

GET STARTED

Join Our Exclusive Newsletter

Get cloud-native insights and expert commentary straight to your inbox.

SUBSCRIBE NOW