Difficulty: Beginner
Estimated Time: 10 minutes

Deploy services to Consul service mesh on Kubernetes

In this lab you will deploy two services, web and api, into Consul's service mesh running on a Kubernetes cluster. The two services will use Consul to discover each other and communicate over mTLS with sidecar proxies. This is the first step in deploying an application into a zero-trust network.

The lab uses Minikube to deploy the cluster but the commands can be applied to any Kubernetes flavor.

If you are already familiar with the basics of Consul, understand Consul service mesh provides a reference guide for the Consul service mesh based labs.

In this hands-on lab, you will deploy two services in the Consul service mesh. Specifically you will:

  • Review a service configuration file
  • Deploy a backend service
  • Verify the backend service deployment by with kubectl
  • View the backend service and its sidecar 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 and its sidecar in the Consul Web UI
  • Configure port forwarding for your frontend service
  • View the frontend from a web browser

Review

Congratulations! You have now successfully deployed two services into Consul's service mesh running on a Kubernetes cluster. The two services are using Consul to discover each other and to communicate over mTLS with sidecar proxies. This is the first step in deploying an application into a zero-trust network.

Specifically you:

  • Reviewed a service configuration file
  • Deployed a backend service
  • Verified the backend service deployment by with kubectl
  • Viewed the backend service and its sidecar in the Consul Web UI
  • Learned how to configure an upstream service using configuration annotations
  • Deployed the frontend service
  • Verified the frontend service deployment by with kubectl
  • Viewed the frontend service and its sidecar in the Consul Web UI
  • Configured port forwarding for your frontend service
  • Viewed the frontend from a web browser

Next Steps

To learn more about Consul service mesh, Understand Consul Service Mesh provides a reference guide for the Consul service mesh based labs.

Deploy services to Consul service mesh on Kubernetes

Step 1 of 4

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

- Installing Helm x.y.x
- Starting Kubernetes...this might take up to 5 minutes.
- Installing Consul service mesh.
- Waiting for Consul pod to complete configuration.

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]