Set up Gloo Mesh Gateway
Start with setting up Gloo Mesh Gateway as an API gateway for your cluster.
Gloo Mesh Gateway is a feature-rich, Kubernetes-native ingress controller and next-generation API gateway. With Gloo Mesh Gateway, you have access to its exceptional function-level routing, discovery capabilities, numerous features, tight integration with leading open-source projects, and support for legacy apps, microservices, and serverless. Gloo Mesh Gateway is uniquely designed to support hybrid applications in which multiple technologies, architectures, protocols, and clouds can coexist.
You can follow this guide to quickly get started with Gloo Mesh Gateway. To learn more about the benefits and architecture, see About. To customize your installation with Helm instead, see the advanced installation guide. To set up the management plane in a dedicated management cluster and the data plane in workload clusters instead of a single-cluster setup, see the multicluster installation guide.
Before you begin
Install the following command-line (CLI) tools.
helm, the Kubernetes package manager.kubectl, the Kubernetes command line tool. Download thekubectlversion that is within one minor version of the Kubernetes clusters you plan to use.meshctl, the Solo command line tool.curl -sL https://run.solo.io/meshctl/install | GLOO_MESH_VERSION=v2.10.2 sh - export PATH=$HOME/.gloo-mesh/bin:$PATH
Create or use an existing Kubernetes or OpenShift cluster, and save the cluster name in an environment variable. Note: The cluster name must be alphanumeric with no special characters except a hyphen (-), lowercase, and begin with a letter (not a number) to follow the Kubernetes DNS label standard.
export CLUSTER_NAME=<cluster_name>Set your Gloo Mesh Gateway license key as an environment variable. If you do not have one, contact an account representative. If you prefer to specify license keys in a secret instead, see Licensing. To check your license’s validity, you can run
meshctl license check --key $(echo ${GLOO_MESH_GATEWAY_LICENSE_KEY} | base64 -w0).export GLOO_MESH_GATEWAY_LICENSE_KEY=<license_key>
Install Gloo Mesh Gateway
Install the Gloo Mesh Gateway control plane in your cluster. This command uses a basic profile to install the control plane components, such as the management server and agent, an external auth and rate limiting server, and the Gloo Mesh Gateway observability components.
Verify that your Gloo Mesh Gateway setup is correctly installed. Note that this check might take a few seconds to verify that:
- The Gloo CRDs are installed at the correct version.
- The management plane pods are running and healthy.
- Any Istio installation versions are compatible with the installed Gloo version.
meshctl checkExample output:
🟢 CRD version check 🟢 Gloo deployment status Namespace | Name | Ready | Status gloo-mesh | ext-auth-service | 1/1 | Healthy gloo-mesh | gloo-mesh-agent | 1/1 | Healthy gloo-mesh | gloo-mesh-mgmt-server | 1/1 | Healthy gloo-mesh | gloo-mesh-redis | 1/1 | Healthy gloo-mesh | gloo-mesh-ui | 1/1 | Healthy gloo-mesh | gloo-telemetry-collector-agent | 3/3 | Healthy gloo-mesh | prometheus-server | 1/1 | Healthy gloo-mesh | rate-limiter | 1/1 | Healthy Connected Pod | Clusters 🟢 Istio compatibility check All Istio versions found are compatible- 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 resources. Because the default workspace is used for demonstration purposes, it does not isolate any resources, and instead allows all Kubernetes and Gloo resources in the workspace.
kubectl get workspace ${CLUSTER_NAME} -n gloo-mesh -o yamlkubectl get workspacesettings default -n gloo-mesh -o yaml
Set up an ingress gateway
Use the Solo distribution of Istio to install an Istio ingress gateway, which serves as the API Gateway for your cluster. You later use Gloo Mesh Gateway to configure this gateway and apply policies to the gateway and the routes that is serves.
Set the following environment variables before you install Istio.
REPO: The repo key for the Solo distribution of Istio that you can get by logging in to the Support Center and reviewing the Istio images built by Solo.io support article.ISTIO_VERSION: The version of Istio that you want to install, such as1.27.0.ISTIO_IMAGE: The Solo distribution of Istio image tag.REVISION: The revision that you want to use for your Istio installation. In this example, the revision is set tomain
export REPO=<repo-key> export ISTIO_VERSION=1.27.0 export ISTIO_IMAGE=${ISTIO_VERSION}-solo export REVISION=mainAdd and update the Helm repository for Istio.
helm repo add istio https://istio-release.storage.googleapis.com/charts helm repo updateInstall the Istio CRDs.
helm upgrade --install istio-base istio/base \ -n istio-system \ --version ${ISTIO_VERSION} \ --create-namespace \ --set defaultRevision=${REVISION}Create the
istiodcontrol plane in your cluster.Create an ingress gateway.
Prepare a Helm values file for the Istio ingress gateway. This sample command downloads an example file,
ingress-gateway.yaml, and updates the environment variables with the values that you previously set.curl -0L https://raw.githubusercontent.com/solo-io/gloo-mesh-use-cases/main/gloo-mesh-enterprise/istio-install/manual-helm/ingress-gateway-1.24+.yaml > ingress-gateway.yaml envsubst < ingress-gateway.yaml > ingress-gateway-values.yamlCreate the ingress gateway.
helm upgrade --install istio-ingressgateway oci://${HELM_REPO}/gateway \ --version ${ISTIO_VERSION} \ --namespace istio-ingress \ --create-namespace \ -f ingress-gateway-values.yamlVerify that the ingress gateway pod is running and the service is assigned an external address. It might take a few minutes for the load balancer to deploy.
kubectl get pods,svc -n istio-ingressExample output:
NAME READY STATUS RESTARTS AGE pod/istio-ingressgateway-7c9ddfbbd9-m58br 1/1 Running 0 3m9s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/istio-ingressgateway LoadBalancer 172.20.140.197 adb25c25b850043d9b3f15c4c211306a-144629538.us-east-2.elb.amazonaws.com 15021:30392/TCP,80:31174/TCP,443:31169/TCP 5m39s
Optional for OpenShift: Expose the ingress gateway by using an OpenShift route.
oc -n istio-ingress expose svc istio-ingressgateway --port=http2
Next
Deploy sample apps to try out the routing capabilities and traffic policies in Gloo Mesh Gateway.
Understand what happened
Find out more information about the Gloo Mesh Gateway environment that you set up in this guide.
Gloo Mesh Gateway installation: This quick start guide used meshctl to install a minimum deployment of Gloo Mesh Gateway for testing purposes, and some optional components are not installed. For more information, check out the CLI install profiles. To learn more about production-level installation options, including advanced configuration options available in the Gloo Helm chart, see the advanced installation guide.
Management server and agent: When you installed the Gloo management plane, a deployment named gloo-mesh-mgmt-server was created to translate and implement your Gloo configurations. Additionally, because the glooAgent.enabled: true setting is included in the gloo-mesh-gateway-single install profile, the cluster was also registered to be managed by Gloo. The deployment named gloo-mesh-agent was created to run the Gloo agent as part of the Gloo data plane.
Relay architecture: When you installed Gloo Mesh Gateway, the connection between the Gloo management server and agent was secured by using simple TLS with a self-signed TLS certificate that the Gloo management server uses to prove its identity to the Gloo agent. To establish initial trust, the agent uses the relay identity token that you provided during the installation. To learn more about other options to secure the relay connection, see Setup options. 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 and implementation. 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.
Gateway proxy installation: The Istio control plane and gateway proxy installation profiles in this getting started guide were provided with Helm.
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.