Skip to content

wildone/learn-consul-cluster-peering

 
 

Repository files navigation

Learn Consul Cluster Peering

This is a companion repo to the Connect Services in Different Consul Clusters with Cluster Peering tutorial, containing sample configuration to:

  • Deploy two Kubernetes clusters with Consul
  • Deploy HashiCups frontend in the first Kubernetes cluster
  • Deploy HashiCups backend in the second Kubernetes cluster
  • Configure Consul cluster peering between the two clusters
  • Export the HashiCups products-api service in the second datacenter
  • Connect the HashiCups frontend and backend via the cluster peering
  • Verify peered Consul services
  • Destroy environment

Thanks

This repository has borrowed code from the following other repositories. Thank you!

Docker Desktop

Create a Kubernetes cluster in Docker Desktop.

Generate kubeconfig

kubectl config view --minify --flatten > docker-desktop/dc1/edge/kubeconfig_edge

Install

terraform -chdir=docker-desktop/dc1 apply -auto-approve 

Uninstall

terraform -chdir=docker-desktop/dc1 destroy -auto-approve

Check if it works

kubectl get pods --all-namespaces

Check errors

kubectl get events --all-namespaces  --sort-by='.metadata.creationTimestamp'

About

A repository to help learn how Consul's Cluster Peering works

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%