Difficulty: Intermediate
Estimated Time: 25 minutes

Federate Consul Between Kubernetes Clusters

In this lab you will perform all the steps needed to deploy two Consul datacenters in two different Kubernetes clusters and federate them using mesh gateways.

The lab uses Shipyard to deploy the clusters but the commands can be applied to any Kubernetes flavor.

If you are already familiar with the basics of Consul, Federation Between Kubernetes Clusters provides a reference guide for the steps performed in this lab.

During this session you will deploy two Consul datacenters using Shipyard and Helm 3.x. Specifically you will:

  • Add the official HashiCorp Consul Helm chart repo
  • Review the Consul service mesh configuration file for your primary datacenter
  • Deploy Consul to a primary Kubernetes cluster using the HashiCorp Consul Helm chart
  • Verify the Consul deployment
  • Enable automatic WAN federation between the two Consul datacenters using Kubernetes secrets
  • Review the Consul service mesh configuration file for your secondary datacenter
  • Deploy Consul to a secondary Kubernetes cluster using the HashiCorp Consul Helm chart
  • Verify federation between the two Consul datacenters
  • Review a service configuration file
  • Deploy a backend service
  • Verify the backend service deployment by with kubectl
  • View the backend service in the Consul Web UI
  • Learn how to configure an upstream service using configuration annotations
  • Deploy the frontend service
  • Verify the frontend service deployment by with kubectl
  • View the frontend service in the Consul Web UI
  • View the frontend service from a web browser

This scenario has explained how to launch a Single Node Kubernetes cluster. Using Minikube is ideal for development environments and testing Kubernetes locally.

Consul Mesh Gateways on Kubernetes

Step 1 of 8

Provisioning Lab Infrastructure

There are a few components that need to be added to the environment; we are adding them now. Wait for the complete message and then move to the next step.

Example Output

[timestamp] - Installing Helm 3.2.1
[timestamp] - Installing Kubectl v1.18.4
[timestamp] - Installing Shipyard 0.0.33
[timestamp] - Running Scenario
...
 <Kubernetes clusters creation logs>
...
[timestamp] - Cleaning temporary files

and concluding with

- Complete! Move on to the next step.

Once this message appears, you are ready to continue.

This tab will not be visible to users and provides only information to help authors when creating content.

Creating Katacoda Scenarios

Thanks for creating Katacoda scenarios. This tab is designed to help you as an author have quick access the information you need when creating scenarios.

Here are some useful links to get you started.

Running Katacoda Workshops

If you are planning to use Katacoda for workshops, please contact [email protected] to arrange capacity.

Debugging Scenarios

Below is the response from any background scripts run or files uploaded. This stream can aid debugging scenarios.

If you still need assistance, please contact [email protected]