Configure Choreo Connect with Consul service mesh deployed on Kubernetes¶
Consul service mesh supports first-class integrations between Consul and Kubernetes.
You can also sync Kubernetes services with non-Kubernetes services using Consul.
Read more on how Consul works with Kubernetes on Consul official documentation.
This part of the document describes how to set up Choreo Connect with Consul service mesh in Kubernetes.
Step 1 - Deploy Consul on K8s¶
Step 2 - Modify Choreo Connect k8s artifacts¶
'consul.hashicorp.com/connect-inject': 'true' annotation to the Adapter's deployment specification (adapter-deployment.yaml in k8s-artifacts directory).
In the config-toml-configmap.yaml file, go to the [adapter.consul] section and update the
apiVersion: apps/v1 kind: Deployment metadata: name: choreo-connect-adapter spec: replicas: 1 selector: matchLabels: app: choreo-connect-adapter template: metadata: labels: app: choreo-connect-adapter annotations: 'consul.hashicorp.com/connect-inject': 'true'
urlwith the IP address of the Kubernetes node.
Apply the k8s artifacts for Choreo Connect.
[adapter.consul] enable = true url = "http://<node-ip>:8500" pollInterval = 5 aclToken = "d3a2a719-4221-8c65-5212-58d4727427ac" mgwServiceName = "choreo-connect" serviceMeshEnabled = true caCertFile = "/home/wso2/security/truststore/consul/consul-agent-ca.pem" certFile = "/home/wso2/security/truststore/consul/local-dc-client-consul-0.pem" keyFile = "/home/wso2/security/truststore/consul/local-dc-client-consul-0-key.pem"
Step 3 - Deploy the API¶
Deploy WSO2 API Manger on Kubernetes.
Using the API Manager, deploy your API as described in how to define the endpoints guide.