Skip to main content
Uncategorized

Connect ANY Kubernetes cluster to GKE with Anthos

By July 15, 2021No Comments

Connect ANY Kubernetes cluster to GKE with Anthos

Google Next ’19 was a great time and by far the biggest conference I’ve attended. The conference promised a plethora of announcements for Google Cloud Platform. The biggest one being the announcement of Anthos.

What is Anthos?

Anthos is an application management platform that is built with open source technologies such as Kubernetes, Istio and Knative. Part of the Anthos offering is GKE On-Prem which lets you run a Kubernetes cluster in your own datacenter. GKE OnPrem.

On top of that, Google has built a multi-cluster, multi-cloud control plane hosted on GCP which allows you to connect any Kubernetes cloud or on-prem cluster and manage it from a single pane of glass on GCP.

In this blog I will demo how to connect and deploy an application to both OpenShift and AWS – Elastic Kubernetes Service Cluster from GKE. Let’s get started.

Register your OpenShift Cluster to GKE

Navigate to the Kubenertes Engine in the Google Cloud Console and register your cluster for OpenShift. Follow the steps in the following pages:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/6.png" %}

Once the cluster is registered, look for the green check to confirm registration:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/8.png" %}

The new cluster will show up in the main Google Cloud Console but will require a login to fully authenticate it:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/10.png" %}

Login to the new cluster using a service account with a non expiring token and make sure it’s all green across the board:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/11.png" %}

Explore the tabs to see GKE pulling all the information from our OpenShift cluster:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/12.png" %}

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/13.png" %}

Deploy an application to OpenShift from GKE

Using the Google Cloud Console I am going to deploy an image to OpenShift:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/12.png" %}

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/13.png" %}

Next, I am going to create a service using the Google Cloud Console:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/16.png" %}

Now, it’s time to view the weather in the browser:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/17.png" %}

Pretty cool! Now let’s extend this to Elastic Kubernetes Service (EKS) on Amazon.

Register your EKS Cluster to GKE

Same as with the OpenShift cluster, I’m going to connect and authenticate to my EKS cluster. You can view all details of your nodes:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/18.png" %}

Deploy to EKS from GCP Marketplace

You read that right. I’m going to deploy an application from the GCP Marketplace cross cloud to Amazon. This is part of the Anthos offering which allows you to deploy in a hybrid fashion with consolidated billing.

Navigate to GCP marketplace and select the app you want to deploy. In my case I’m going to deploy Grafana:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/19.png" %}

Configure the application for EKS:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/20.png" %}

Wait for the magic green checks to make sure the app is properly deployed.

Next, expose the app in the Services menu and watch an ELB URL appear magically:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/21.png" %}

Navigate to that ELB URL to access Grafana running on EKS:

<img src="https://res.cloudinary.com/arctiq/image/upload/q_auto/posts/22.png" %}

And voila! A little glimpse into the hybrid cloud story presented by Google Anthos. In our case the OpenShift cluster is running on-prem but this demo can be extended to Kubernetes clusters running on-prem or in the cloud.

Stay tuned for more Anthos use cases we are working on… This Hybrid Cloud thing is the real deal!

Interested in finding out more about Google Kubernetes Engine, RedHat OpenShift and Anthos? We would love to hear from you!

//take the first step