This guide walks you through installing Gloo Mesh multi-cluster setup.
- 1 (single cluster) or 3 Kubernetes clusters (multi-cluster). 1 management cluster, 2 workload clusters
kubectlconfigured to access all clustershelminstalledmeshctlCLI tool- Gloo Mesh license key (can be obtained from Solo.io)
Load environment variables and install meshctl:
Copy .env-template to .env and fill in the variables.
source .envcurl -sL https://run.solo.io/meshctl/install | GLOO_MESH_VERSION=v2.10.0 sh -
export PATH=$HOME/.gloo-mesh/bin:$PATHexport MGMT_CLUSTER=
export REMOTE_CLUSTER1=
export REMOTE_CLUSTER2=
export MGMT_CONTEXT=
export REMOTE_CONTEXT1=
export REMOTE_CONTEXT2=export GLOO_MESH_LICENSE_KEY=Install Gloo Mesh management plane in the management cluster:
- Single cluster:
meshctl install --profiles mgmt-server \
--register \
--kubecontext ${MGMT_CONTEXT} \
--set common.cluster=${MGMT_CLUSTER} \
--set glooUi.enabled=true \
--set glooUi.serviceType=LoadBalancer \
--set licensing.glooMeshLicenseKey=${GLOO_MESH_LICENSE_KEY}kubectl get pods -n gloo-mesh --context $MGMT_CONTEXT- Multi-cluster:
meshctl install --profiles mgmt-server \
--kubecontext ${MGMT_CONTEXT} \
--set common.cluster=${MGMT_CLUSTER} \
--set glooUi.enabled=true \
--set glooUi.serviceType=LoadBalancer \
--set licensing.glooMeshLicenseKey=${GLOO_MESH_LICENSE_KEY}kubectl get pods -n gloo-mesh --context $MGMT_CONTEXTGet Telemetry Gateway address to be used when registering remote clusters:
Depends on your kuberentes flavour:
export TELEMETRY_GATEWAY_IP=$(kubectl get svc -n gloo-mesh gloo-telemetry-gateway --context $MGMT_CONTEXT -o jsonpath="{.status.loadBalancer.ingress[0]['hostname','ip']}")
export TELEMETRY_GATEWAY_PORT=$(kubectl get svc -n gloo-mesh gloo-telemetry-gateway --context $MGMT_CONTEXT -o jsonpath='{.spec.ports[?(@.name=="otlp")].port}')
export TELEMETRY_GATEWAY_ADDRESS=${TELEMETRY_GATEWAY_IP}:${TELEMETRY_GATEWAY_PORT}
echo $TELEMETRY_GATEWAY_ADDRESSmeshctl cluster register $REMOTE_CLUSTER1 \
--kubecontext $MGMT_CONTEXT \
--remote-context $REMOTE_CONTEXT1 \
--profiles agent,ratelimit,extauth \
--telemetry-server-address $TELEMETRY_GATEWAY_ADDRESS
meshctl cluster register $REMOTE_CLUSTER2 \
--kubecontext $MGMT_CONTEXT \
--remote-context $REMOTE_CONTEXT2 \
--profiles agent,ratelimit,extauth \
--telemetry-server-address $TELEMETRY_GATEWAY_ADDRESSkubectl get pods -n gloo-mesh --context $REMOTE_CONTEXT1
kubectl get pods -n gloo-mesh --context $REMOTE_CONTEXT2Install Istio in the workload clusters using Gloo Mesh Service Mesh Controller (SMC):
- Single cluster:
helm upgrade --install gloo-operator oci://us-docker.pkg.dev/solo-public/gloo-operator-helm/gloo-operator \
--version 0.3.1 \
-n gloo-mesh \
--create-namespace \
--kube-context ${MGMT_CONTEXT} \
--set manager.env.SOLO_ISTIO_LICENSE_KEY=${GLOO_MESH_LICENSE_KEY}Check the operator is running:
kubectl get pods -n gloo-mesh --context ${MGMT_CONTEXT} -l app.kubernetes.io/name=gloo-operator- Multi-cluster:
for context in ${REMOTE_CONTEXT1} ${REMOTE_CONTEXT2}; do
helm upgrade --install gloo-operator oci://us-docker.pkg.dev/solo-public/gloo-operator-helm/gloo-operator \
--version 0.3.1 \
-n gloo-mesh \
--create-namespace \
--kube-context ${context} \
--set manager.env.SOLO_ISTIO_LICENSE_KEY=${GLOO_MESH_LICENSE_KEY}
doneCheck the operator is running:
for context in ${REMOTE_CONTEXT1} ${REMOTE_CONTEXT2}; do
kubectl get pods -n gloo-mesh --context ${context} -l app.kubernetes.io/name=gloo-operator
doneDeploy Istio using SMC:
- Single cluster:
kubectl apply -n gloo-mesh --context ${MGMT_CONTEXT} -f - <<EOF
apiVersion: operator.gloo.solo.io/v1
kind: ServiceMeshController
metadata:
name: managed-istio
labels:
app.kubernetes.io/name: managed-istio
spec:
# required for multicluster setups
cluster: mgmt
dataplaneMode: Ambient
installNamespace: istio-system
version: 1.27.0
EOF- Multi-cluster:
function apply_smc() {
context=${1:?context}
cluster=${2:?cluster}
kubectl apply -n gloo-mesh --context ${context} -f - <<EOF
apiVersion: operator.gloo.solo.io/v1
kind: ServiceMeshController
metadata:
name: managed-istio
labels:
app.kubernetes.io/name: managed-istio
spec:
# required for multicluster setups
cluster: ${cluster}
dataplaneMode: Ambient
installNamespace: istio-system
version: 1.27.0
EOF
}
apply_smc ${REMOTE_CONTEXT1} ${REMOTE_CLUSTER1}
apply_smc ${REMOTE_CONTEXT2} ${REMOTE_CLUSTER2}Check Istio pods are running.