Set up Gloo Mesh and Istio
Start with setting up Gloo Mesh Enterprise in one cluster.
The instructions in this guide assume that you want to install Gloo Mesh in the same cluster that runs your workloads. If you want to install Gloo Mesh in a dedicated cluster, and use other clusters for your service mesh workloads, see the Multicluster setup instead.
Before you begin
-
Add your Gloo Mesh Enterprise license that you got from your Solo account representative. Or, you might have a trial license key instead for a trial installation. If you do not have one, contact an account representative. If you prefer to specify license keys in a secret instead, see Prepare to install.
export GLOO_MESH_LICENSE_KEY=<gloo-mesh-or-trial-license-key>
-
Install the following CLI tools:
meshctl
, the Gloo command line tool for bootstrapping Gloo Platform, registering clusters, describing configured resources, and more.kubectl
, the Kubernetes command line tool. Download thekubectl
version that is within one minor version of the Kubernetes cluster you plan to use.- Openshift only:
oc
, the OpenShift command line tool. Download theoc
version that is the same minor version of the OpenShift cluster you plan to use.
-
Create or use an existing Kubernetes or OpenShift cluster. Note: The cluster name cannot contain underscores (
_
). -
Save the Kubernetes context for your cluster as an environment variable, and switch to that context. To find the context, run
kubectl config get-contexts
, look for your cluster in theCLUSTER
column, and get the context name in theNAME
column.export MGMT_CONTEXT=<cluster_context> kubectl config use-context $MGMT_CONTEXT
-
Save the name of the cluster as an environment variable.
export CLUSTER_NAME=<cluster_name>
Set up Gloo Mesh
-
Save the following information in environment variables. This information is required for deploying managed Istio installations in workload clusters.
$REPO
: A Gloo Istio repo key that you can get by logging in to the Support Center and reviewing the Istio images built by Solo.io support article.$ISTIO_IMAGE
: The Istio version, such as1.16.1-solo
.$REVISION
: Take the Istio major and minor version numbers and replace the period with a hyphen, such as1-16
.
export REPO=<repo-key> export ISTIO_IMAGE=1.16.1-solo export REVISION=1-16
-
Download the sample Helm values file from GitHub to your local workstation.
curl -0L https://raw.githubusercontent.com/solo-io/gloo-mesh-use-cases/main/gloo-mesh/getting-started/2.3/gs-single.yaml > gs-single.yaml
curl -0L https://raw.githubusercontent.com/solo-io/gloo-mesh-use-cases/main/gloo-mesh/getting-started/2.3/gs-single-openshift.yaml > gs-single.yaml
-
Update the
gs-single.yaml
file with the environment variables that you previously set. Save the updated file asgs-single-values.yaml
.- Tip: Instead of updating the file manually, try running a terminal command to substitute values, such as the following command.
envsubst < gs-single.yaml > gs-single-values.yaml
- Tip: Instead of updating the file manually, try running a terminal command to substitute values, such as the following command.
-
Openshift only: Elevate the permissions of the following service accounts that will be created. These permissions allow the Istio sidecars to make use of a user ID that is normally restricted by OpenShift.
oc adm policy add-scc-to-group anyuid system:serviceaccounts:istio-system oc adm policy add-scc-to-group anyuid system:serviceaccounts:gm-iop-1-16 oc adm policy add-scc-to-group anyuid system:serviceaccounts:gloo-mesh-gateways
-
Install Gloo Mesh and Istio in your cluster. This command installs the Gloo Platform components, such as the Gloo management server, agent, and Prometheus server, and the managed Istio components, such as the
istiod
control plane, in your cluster.meshctl install --namespace gloo-mesh \ --license $GLOO_MESH_LICENSE_KEY \ --chart-values-file gs-single-values.yaml
-
Verify that the Gloo components have a status of
Running
.kubectl get pods -n gloo-mesh
Example output:
NAME READY STATUS RESTARTS AGE gloo-mesh-agent-5b87576f79-njsxf 1/1 Running 0 30s gloo-mesh-mgmt-server-7cdcbcbd4-4s8wp 1/1 Running 0 30s gloo-mesh-redis-794d79b7df-r2rtp 1/1 Running 0 30s gloo-mesh-ui-748fd66f5c-lftcx 3/3 Running 0 30s prometheus-server-647b488bb-vg7t5 2/2 Running 0 30s
-
Verify that the management plane is correctly installed. This check might take a few seconds to ensure that the Gloo pods are running and that the workload agent is running and connected to the management server.
meshctl check
Example output:
Running Gloo Platform checks 🟢 Gloo Platform Deployment Status 🟢 Gloo Mgmt Server Connectivity to Agents +----------+------------+--------------------------------------------------+ | CLUSTER | REGISTERED | CONNECTED POD | +----------+------------+--------------------------------------------------+ | cluster1 | true | gloo-mesh/gloo-mesh-mgmt-server-676f4b9945-2pngd | +----------+------------+--------------------------------------------------+
-
Verify that the Istio pods have a status of
Running
.kubectl get pods -n istio-system
Example output:
NAME READY STATUS RESTARTS AGE istiod-1-16-b65676555-g2vmr 1/1 Running 0 8m57s
-
Verify that Gloo successfully discovered the Istio service mesh. Gloo creates internal
mesh
resources to represent the state of the Istio service mesh.kubectl get mesh -n gloo-mesh
-
Optional: Check out the workspace and workspace settings that were created for you. Workspaces help to organize team resources in your cluster, and to isolate Kubernetes and Gloo Gateway resources. Because the default workspace is used for demonstration purposes, it does not isolate any resources, and instead allows all Kubernetes and Gloo Gateway resources in the workspace.
kubectl get workspace $CLUSTER_NAME -n gloo-mesh -o yaml
kubectl get workspacesettings default -n gloo-mesh -o yaml
Next steps
Now that you have Gloo Mesh Enterprise up and running, check out some of the following resources to learn more about Gloo Mesh or try other Gloo Mesh features.
- Browse Gloo Mesh traffic control and security policies to try out some of Gloo Mesh Enterprise's features.
- Check out the setup guide for advanced installation and cluster registration options.
- Talk to an expert to get advice or build out a proof of concept.
- Join the #gloo-mesh channel in the Solo.io community slack.
- Try out one of the Gloo Mesh workshops.
Cleanup
If you no longer need this quick-start Gloo Mesh environment, you can deregister the cluster, uninstall management components, and uninstall Istio resources by following the steps in Uninstalling Gloo Mesh and Istio.
Understand what happened
Find out more information about the Gloo Mesh environment that you set up in this guide.
Gloo Mesh installation: This quick start guide used meshctl
to install a minimum deployment of Gloo Mesh Enterprise for testing purposes, and some optional components are not installed. To learn more about production-level installation options, including advanced configuration options available in the Gloo Mesh Enterprise Helm chart, see the Setup guide.
Management server: When you installed Gloo Mesh Enterprise in the management cluster, a deployment named gloo-mesh-mgmt-server
was created to run the relay server. As you create service mesh configurations, the management components translate your Gloo Mesh configurations into Istio resources that are implemented in the service mesh. The management plane also aggregates all of the discovered Istio service mesh components into simplified, internal Gloo Mesh custom resources.
Relay agent: Because you included the registerMgmtPlane: true
setting in the installation values file, the cluster was also registered to be managed by Gloo. The deployment named gloo-mesh-agent
was created to run the workload (relay) agent. To learn more about cluster registration and how to register clusters manually, review the cluster registration guide for meshctl
or Helm.
Relay architecture: In a multicluster setup, the Gloo agent discovers Gloo and Kubernetes resources, such as deployments and services, and sends snapshots of them to the management server for translation into Istio resources. However, in a single cluster setup, your resources are written directly to the cluster without relay. For more information about relay server-agent communication, see the relay architecture page.
Istio installation: The Istio profiles in this getting started guide were provided within the Gloo installation Helm chart for simplicity. However, Gloo Mesh can discover and manage Istio deployments regardless of their installation options. For more information, see the Gloo Istio setup guides. Additionally, note that although an ingress gateway was deployed, you must have a Gloo Gateway license to route north-south (ingress) traffic to workloads in your Gloo environment.
Gloo workspace: Gloo workspaces let you organize team resources across Kubernetes namespaces and clusters. In this example, a single workspace is created for everything. Later, as your teams grow, you can create a workspace for each team, to enforce service isolation, set up federation, and even share resources by importing and exporting. You can also change the default workspace by following the Workspace setup guide.