The software described in this documentation is either no longer supported or is in extended support.
Oracle recommends that you upgrade to a current supported release.

Chapter 2 Setting up a Service Mesh

This chapter discusses how to install the Istio module to set up a service mesh, and the components deployed when you do this.

The high level overview of setting up a service mesh is:

  • Oracle Linux Cloud Native Environment: Set up an environment in which to deploy the modules.

  • Kubernetes module: You can install a service mesh into an existing Kubernetes cluster, or deploy the cluster at the same time.

  • Helm module: Helm is a tool to manage Kubernetes packages and is used to install applications and resources into Kubernetes clusters. Helm interacts with the Kubernetes API server to install, upgrade, query and remove Kubernetes resources. Helm is used to install the Istio module.

  • Istio module: The Istio module deploys the required containers to deploy a service mesh, including the Istio ingress and egress gateways, Prometheus (a time-series metric collection database), and the cluster visualization tool Grafana.

When you deploy the Istio module, an embedded instance of Prometheus is also deployed. Prometheus is used to monitor and gather metrics about the Kubernetes cluster.

Another embedded component deployed with the Istio module is Grafana. Grafana is a monitoring and visualization tool for time-series data stored in a database which in this case is Prometheus. Grafana enables you to visually query and monitor the network traffic and services in your Kubernetes cluster. Grafana includes browser-based dashboards to visualize the cluster metrics gathered from Prometheus. For information on using Grafana, see Monitoring and Visualization.

You can enter all the information required to create a service mesh in a number of ways. The examples in this chapter show the following methods, although there are other combinations you can use:

In reality, the method you use to deploy the modules depends on your own environment and preference, and whether you want to deploy into an existing Kubernetes cluster, create a Kubernetes cluster at the same time as deploying the service mesh, or take it step by step in some other way. There are many variations and possibilities you can use to do the deployment of a service mesh, or any module deployment for that matter.

2.1 Deploying a Service Mesh (Simple Method)

You can deploy all the modules required to create a service mesh and a Kubernetes cluster using a single olcnectl module create command. This method might be useful if you want to deploy a service mesh at the same time as deploying a Kubernetes cluster. If you have an existing deployment of the Kubernetes module, you can specify that instance when deploying a service mesh.

Figure 2.1, “Example Deployment” shows the modules deployed in this example. The name of each module in the examples is shown in the boxes. The examples create an Oracle Linux Cloud Native Environment named myenvironment, into which a Kubernetes module named mycluster is deployed, and then into which a Helm module named myhelm is deployed, and finally, an Istio module named myistio.


For the full list of the options available when creating modules, see the module arguments for the olcnectl command in Getting Started at:

https://docs.oracle.com/en/operating-systems/olcne/1.1/start/olcnectl.html

To deploy a service mesh:

  1. If you do not already have an Oracle Linux Cloud Native Environment set up, create an environment into which the modules can be deployed. For information on setting up an environment, see Getting Started. The name of the environment in this example is myenvironment.

  2. If you do not already have a Kubernetes module set up or deployed, set one up. For information on adding a Kubernetes module to an environment, see Getting Started at:

    https://docs.oracle.com/en/operating-systems/olcne/1.1/start/install-module-add.html

    The name of the Kubernetes module in this example is mycluster.

  3. Create the service mesh by adding the required modules to the Kubernetes module in the environment using the olcnectl module create command. This example uses a Kubernetes module named mycluster, into which it deploys a Helm module named myhelm, and finally, it creates an Istio module named myistio.

    $ olcnectl --api-server 127.0.0.1:8091 module create \
      --environment-name myenvironment \
      --module istio \
      --name myistio \
      --helm-kubernetes-module mycluster \
      --istio-helm-module myhelm

    The --module option sets the module type to create, which is istio. You define the name of the Istio module using the --name option, which in this case is myistio.

    As the Istio module requires Kubernetes and Helm, you must also provide the options for those modules.

    The --helm-kubernetes-module option sets the name of the Kubernetes module to use. The Kubernetes module should already be set up or deployed. If you have an existing Kubernetes module deployed, you can specify the name of the module using this option. If no Kubernetes module is deployed with the name you provide, a new module is deployed which allows you to deploy Kubernetes at the same time as a service mesh.

    The --istio-helm-module option sets the name of the Helm module to deploy. After this instance of Helm is deployed it is used to deploy the Istio module.

    If you do not include all the required options when adding the modules you are prompted to provide them.

    Note

    The Istio module also requires an instance of Prometheus. When you deploy an Istio module, an embedded instance of Prometheus is created and deployed. You do not need to provide any information for the embedded Prometheus instance.

  4. If you are deploying a new Kubernetes module, validate the module can be deployed to the nodes using the olcnectl module validate command. You do not need to perform this step if you have an existing Kubernetes module deployed to the nodes. For example:

    $ olcnectl --api-server 127.0.0.1:8091 module validate \
      --environment-name myenvironment \
      --name mycluster
  5. If you are deploying a new Kubernetes module, use the olcnectl module install command to install it on the nodes. For example:

    $ olcnectl --api-server 127.0.0.1:8091 module install \
      --environment-name myenvironment \
      --name mycluster 
  6. Use the olcnectl module validate command to validate the Helm module can be deployed to the nodes. For example:

    $ olcnectl --api-server 127.0.0.1:8091 module validate \
      --environment-name myenvironment \
      --name myhelm
  7. Use the olcnectl module install command to install the Helm module. For example:

    $ olcnectl --api-server 127.0.0.1:8091 module install \
      --environment-name myenvironment \
      --name myhelm 

    The Helm software packages are installed on the master nodes, and the Helm module is deployed into the Kubernetes cluster.

  8. Use the olcnectl module validate command to validate the Istio module can be deployed to the nodes. For example:

    $ olcnectl --api-server 127.0.0.1:8091 module validate \
      --environment-name myenvironment \
      --name myistio
  9. Use the olcnectl module install command to install the Istio module. For example:

    $ olcnectl --api-server 127.0.0.1:8091 module install \
      --environment-name myenvironment \
      --name myistio

    The Istio software packages are installed on the master nodes, and the Istio module is deployed into the Kubernetes cluster.