- mTLS-encrypted pod-to-pod communication
- Detailed visibility and troubleshooting for east–west traffic
- Fine-grained access control between services
Prerequisites
Ensure you have the following in place:1. Add the HashiCorp Helm Repository
Register the official HashiCorp charts, search for the Consul chart, and update your local index:2. Define Your Consul Configuration
Create a file namedconsul.yaml to customize your deployment. This example enables the UI, sidecar injection, and sets up two server replicas:
3. (Optional) Review Your Directory Structure
If you keep your configurations and helper scripts together, you might have:In this lesson, we’ll run Helm commands manually rather than via the helper script.
4. Install Consul with Helm
Deploy Consul into your cluster using your customconsul.yaml:
5. Verify the Deployment
Wait a minute for pods to initialize, then confirm they’re running:consul-ui ClusterIP:
6. Access the Consul Web UI
Forward the UI port to your local machine:Avoid exposing the Consul UI to the public internet. Use secure tunnels or VPNs for production environments.
Congratulations! You’ve successfully installed and accessed HashiCorp Consul as a service mesh on Kubernetes.