Set up Gloo Mesh

Start with setting up Gloo Mesh Enterprise in one cluster.

  1. 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).

    export CLUSTER_NAME=<cluster_name>
    

    Want to try out the Solo distribution of Cilium CNI? Check out Install the Solo distribution of Cilium CNI to prepare your clusters first.

  2. Install meshctl, the Gloo command line tool for bootstrapping Gloo Platform, registering clusters, describing configured resources, and more. Be sure to download version 2.5.0, which uses the latest Gloo Mesh installation values.

    curl -sL https://run.solo.io/meshctl/install | GLOO_MESH_VERSION=v2.5.0 sh -
    export PATH=$HOME/.gloo-mesh/bin:$PATH
    
  3. Install Gloo Mesh and Istio in your cluster. This command uses basic profiles to install the control plane components, such as the management server and Prometheus server, and the data plane components, such as the agent, managed Istio service mesh, rate limit server, and external auth server, in your cluster. If you do not have a license key, contact an account representative.

    Note: If you installed the Solo distribution of Cilium CNI in your clusters, include the --set glooNetwork.enabled=true flag.

    meshctl install --profiles gloo-mesh-single,ratelimit,extauth \
      --set common.cluster=$CLUSTER_NAME \
      --set demo.manageAddonNamespace=true \
      --set glooMgmtServer.createGlobalWorkspace=true \
      --set licensing.glooMeshLicenseKey=$GLOO_MESH_LICENSE_KEY
    
    1. 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. For more information, see the Istio on OpenShift documentation.
      oc adm policy add-scc-to-group anyuid system:serviceaccounts:istio-system
      oc adm policy add-scc-to-group anyuid system:serviceaccounts:gloo-mesh-gateways
      oc adm policy add-scc-to-group anyuid system:serviceaccounts:gloo-mesh-addons
      oc adm policy add-scc-to-group anyuid system:serviceaccounts:gm-iop-1-20
      
    2. Create the gloo-mesh-gateways and gloo-mesh-addons projects, and create NetworkAttachmentDefinition custom resources for the projects.
      kubectl create ns gloo-mesh-gateways
      kubectl create ns gloo-mesh-addons
      
      cat <<EOF | oc -n gloo-mesh-gateways create -f -
      apiVersion: "k8s.cni.cncf.io/v1"
      kind: NetworkAttachmentDefinition
      metadata:
        name: istio-cni
      EOF
      
      cat <<EOF | oc -n gloo-mesh-addons create -f -
      apiVersion: "k8s.cni.cncf.io/v1"
      kind: NetworkAttachmentDefinition
      metadata:
        name: istio-cni
      EOF
      
    3. Install Gloo Mesh and Istio. Note: If you installed the Solo distribution of Cilium CNI in your clusters, include the --set glooNetwork.enabled=true flag.
      meshctl install --profiles gloo-mesh-single-openshift,ratelimit,extauth \
        --set common.cluster=$CLUSTER_NAME \
        --set glooMgmtServer.createGlobalWorkspace=true \
        --set licensing.glooMeshLicenseKey=$GLOO_MESH_LICENSE_KEY
      

    Note: In OpenShift 4.11 and later, you might see warnings for the pods and containers which violate the OpenShift PodSecurity "restricted:v1.24" profile, due to the elevated permissions required by Istio. You can ignore these warnings. For more info, see this article.

  4. Verify that Gloo Mesh is correctly installed. This check might take a few seconds to verify that:

    • Your Gloo Platform product licenses are valid and current.
    • The Gloo Platform CRDs are installed at the correct version.
    • The Gloo Mesh pods are running and healthy.
    • The Gloo agent is running and connected to the management server.
    meshctl check
    

    Example output:

    🟢 License status
    
     INFO  gloo-mesh enterprise license expiration is 25 Aug 24 10:38 CDT
     INFO  Valid GraphQL license module found
    
    🟢 CRD version check
    
    🟢 Gloo Platform deployment status
    
    Namespace        | Name                           | Ready | Status 
    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        | prometheus-server              | 1/1   | Healthy
    gloo-mesh-addons | ext-auth-service               | 1/1   | Healthy
    gloo-mesh-addons | rate-limiter                   | 1/1   | Healthy
    gloo-mesh-addons | redis                          | 1/1   | Healthy
    gloo-mesh        | gloo-telemetry-collector-agent | 3/3   | Healthy
    
    🟢 Mgmt server connectivity to workload agents
    
    Cluster  | Registered | Connected Pod                                   
    cluster1 | true       | gloo-mesh/gloo-mesh-mgmt-server-65bd557b95-v8qq6
    
  5. 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-20-b65676555-g2vmr     1/1     Running   0          8m57s
    
  6. Verify that Gloo Mesh 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
    
  7. 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 Mesh resources. Because the default workspace is used for demonstration purposes, it does not isolate any resources, and instead allows all Kubernetes and Gloo Mesh resources in the workspace.

    kubectl get workspace $CLUSTER_NAME -n gloo-mesh -o yaml
    
    kubectl get workspacesettings default -n gloo-mesh -o yaml
    

Next

Deploy sample apps to try out the routing capabilities and traffic policies in Gloo Mesh.

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 Helm chart, see the Setup guide.

Management server and agent: When you installed the Gloo Mesh control plane, a deployment named gloo-mesh-mgmt-server was created to translate and implement your Gloo configurations. 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. Additionally, because the glooAgent.enabled: true setting is included in the gloo-mesh-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 Mesh data plane.

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 Mesh installation Helm chart. However, Gloo Mesh can discover Istio service meshes regardless of their installation options. To manually install Istio, see the advanced configuration 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.