This is a cache of https://docs.openshift.com/container-platform/4.9/service_mesh/v2x/ossm-create-smcp.html. It is a snapshot of the page at 2024-11-22T19:25:37.277+0000.
Creating the <strong>service</strong>MeshControlPlane - <strong>service</strong> Mesh 2.x | <strong>service</strong> Mesh | OpenShift Container Platform 4.9
×

You can deploy a basic installation of the serviceMeshControlPlane(SMCP) by using either the OpenShift Container Platform web console or from the command line using the oc client tool.

This basic installation is configured based on the default OpenShift settings and is not designed for production use. Use this default installation to verify your installation, and then configure your serviceMeshControlPlane for your environment.

Red Hat OpenShift service on AWS (ROSA) places additional restrictions on where you can create resources and as a result the default deployment does not work. See Installing service Mesh on Red Hat OpenShift service on AWS for additional requirements before deploying your SMCP in a ROSA environment.

The service Mesh documentation uses istio-system as the example project, but you can deploy the service mesh to any project.

Deploying the service Mesh control plane from the web console

You can deploy a basic serviceMeshControlPlane by using the web console. In this example, istio-system is the name of the service Mesh control plane project.

Prerequisites
  • The Red Hat OpenShift service Mesh Operator must be installed.

  • An account with the cluster-admin role.

Procedure
  1. Log in to the OpenShift Container Platform web console as a user with the cluster-admin role. If you use Red Hat OpenShift Dedicated, you must have an account with the dedicated-admin role.

  2. Create a project named istio-system.

    1. Navigate to HomeProjects.

    2. Click Create Project.

    3. In the Name field, enter istio-system. The serviceMeshControlPlane resource must be installed in a project that is separate from your microservices and Operators.

      These steps use istio-system as an example, but you can deploy your service Mesh control plane in any project as long as it is separate from the project that contains your services.

    4. Click Create.

  3. Navigate to OperatorsInstalled Operators.

  4. Click the Red Hat OpenShift service Mesh Operator, then click Istio service Mesh Control Plane.

  5. On the Istio service Mesh Control Plane tab, click Create serviceMeshControlPlane.

  6. On the Create serviceMeshControlPlane page, accept the default service Mesh control plane version to take advantage of the features available in the most current version of the product. The version of the control plane determines the features available regardless of the version of the Operator.

    You can configure serviceMeshControlPlane settings later. For more information, see Configuring Red Hat OpenShift service Mesh.

    1. Click Create. The Operator creates pods, services, and service Mesh control plane components based on your configuration parameters.

  7. To verify the control plane installed correctly, click the Istio service Mesh Control Plane tab.

    1. Click the name of the new control plane.

    2. Click the Resources tab to see the Red Hat OpenShift service Mesh control plane resources the Operator created and configured.

Deploying the service Mesh control plane using the CLI

You can deploy a basic serviceMeshControlPlane from the command line.

Prerequisites
  • The Red Hat OpenShift service Mesh Operator must be installed.

  • Access to the OpenShift CLI (oc).

Procedure
  1. Log in to the OpenShift Container Platform CLI as a user with the cluster-admin role. If you use Red Hat OpenShift Dedicated, you must have an account with the dedicated-admin role.

    $ oc login --username=<NAMEOFUSER> https://<HOSTNAME>:6443
  2. Create a project named istio-system.

    $ oc new-project istio-system
  3. Create a serviceMeshControlPlane file named istio-installation.yaml using the following example. The version of the service Mesh control plane determines the features available regardless of the version of the Operator.

    Example version 2.3 istio-installation.yaml
    apiVersion: maistra.io/v2
    kind: serviceMeshControlPlane
    metadata:
      name: basic
      namespace: istio-system
    spec:
      version: v2.3
      tracing:
        type: Jaeger
        sampling: 10000
      addons:
        jaeger:
          name: jaeger
          install:
            storage:
              type: Memory
        kiali:
          enabled: true
          name: kiali
        grafana:
          enabled: true
  4. Run the following command to deploy the service Mesh control plane, where <istio_installation.yaml> includes the full path to your file.

    $ oc create -n istio-system -f <istio_installation.yaml>
  5. To watch the progress of the pod deployment, run the following command:

    $ oc get pods -n istio-system -w

    You should see output similar to the following:

    NAME                                   READY   STATUS    RESTARTS   AGE
    grafana-b4d59bd7-mrgbr                 2/2     Running   0          65m
    istio-egressgateway-678dc97b4c-wrjkp   1/1     Running   0          108s
    istio-ingressgateway-b45c9d54d-4qg6n   1/1     Running   0          108s
    istiod-basic-55d78bbbcd-j5556          1/1     Running   0          108s
    jaeger-67c75bd6dc-jv6k6                2/2     Running   0          65m
    kiali-6476c7656c-x5msp                 1/1     Running   0          43m
    prometheus-58954b8d6b-m5std            2/2     Running   0          66m

Validating your SMCP installation with the CLI

You can validate the creation of the serviceMeshControlPlane from the command line.

Procedure
  1. Log in to the OpenShift Container Platform CLI as a user with the cluster-admin role. If you use Red Hat OpenShift Dedicated, you must have an account with the dedicated-admin role.

    $ oc login https://<HOSTNAME>:6443
  2. Run the following command to verify the service Mesh control plane installation, where istio-system is the namespace where you installed the service Mesh control plane.

    $ oc get smcp -n istio-system

    The installation has finished successfully when the STATUS column is ComponentsReady.

    NAME    READY   STATUS            PROFILES      VERSION   AGE
    basic   10/10   ComponentsReady   ["default"]   2.1.1     66m

Validating your SMCP installation with Kiali

You can use the Kiali console to validate your service Mesh installation. The Kiali console offers several ways to validate your service Mesh components are deployed and configured properly.

Procedure
  1. Log in to the OpenShift Container Platform web console as a user with cluster-admin rights. If you use Red Hat OpenShift Dedicated, you must have an account with the dedicated-admin role.

  2. Navigate to NetworkingRoutes.

  3. On the Routes page, select the service Mesh control plane project, for example istio-system, from the Namespace menu.

    The Location column displays the linked address for each route.

  4. If necessary, use the filter to find the route for the Kiali console. Click the route Location to launch the console.

  5. Click Log In With OpenShift.

    When you first log in to the Kiali Console, you see the Overview page which displays all the namespaces in your service mesh that you have permission to view. When there are multiple namespaces shown on the Overview page, Kiali shows namespaces with health or validation problems first.

    Kiali Overview page showing istio-system
    Figure 1. Kiali Overview page

    The tile for each namespace displays the number of labels, the Istio Config health, the number of and Applications health, and Traffic for the namespace. If you are validating the console installation and namespaces have not yet been added to the mesh, there might not be any data to display other than istio-system.

  6. Kiali has four dashboards specifically for the namespace where the service Mesh control plane is installed. To view these dashboards, click the Options menu kebab on the tile for the control plane namespace, for example, istio-system, and select one of the following options:

    • Istio Mesh Dashboard

    • Istio Control Plane Dashboard

    • Istio Performance Dashboard

    • Istio Wasm Exetension Dashboard

      Istio Control Plane Dashboard showing data for bookinfo sample project
      Figure 2. Grafana Istio Control Plane Dashboard

      Kiali also installs two additional Grafana dashboards, available from the Grafana Home page:

    • Istio Workload Dashboard

    • Istio service Dashboard

  7. To view the service Mesh control plane nodes, click the Graph page, select the Namespace where you installed the serviceMeshControlPlane from the menu, for example istio-system.

    1. If necessary, click Display idle nodes.

    2. To learn more about the Graph page, click the Graph tour link.

    3. To view the mesh topology, select one or more additional namespaces from the service Mesh Member Roll from the Namespace menu.

  8. To view the list of applications in the istio-system namespace, click the Applications page. Kiali displays the health of the applications.

    1. Hover your mouse over the information icon to view any additional information noted in the Details column.

  9. To view the list of workloads in the istio-system namespace, click the Workloads page. Kiali displays the health of the workloads.

    1. Hover your mouse over the information icon to view any additional information noted in the Details column.

  10. To view the list of services in the istio-system namespace, click the services page. Kiali displays the health of the services and of the configurations.

    1. Hover your mouse over the information icon to view any additional information noted in the Details column.

  11. To view a list of the Istio Configuration objects in the istio-system namespace, click the Istio Config page. Kiali displays the health of the configuration.

    1. If there are configuration errors, click the row and Kiali opens the configuration file with the error highlighted.

Installing on Red Hat OpenShift service on AWS (ROSA)

Starting with version 2.2, Red Hat OpenShift service Mesh supports installation on Red Hat OpenShift service on AWS (ROSA). This section documents the additional requirements when installing service Mesh on this platform.

Installation location

You must create a new namespace, for example istio-system, when installing Red Hat OpenShift service Mesh and creating the serviceMeshControlPlane.

Required service Mesh control plane configuration

The default configuration in the serviceMeshControlPlane file does not work on a ROSA cluster. You must modify the default SMCP and set spec.security.identity.type=ThirdParty when installing on Red Hat OpenShift service on AWS.

Example serviceMeshControlPlane resource for ROSA
apiVersion: maistra.io/v2
kind: serviceMeshControlPlane
metadata:
  name: basic
  namespace: istio-system
spec:
  version: v2.3
  security:
    identity:
      type: ThirdParty  #required setting for ROSA
  tracing:
    type: Jaeger
    sampling: 10000
  policy:
    type: Istiod
  addons:
    grafana:
      enabled: true
    jaeger:
      install:
        storage:
          type: Memory
    kiali:
      enabled: true
    prometheus:
      enabled: true
  telemetry:
    type: Istiod

Restrictions on Kiali configuration

Red Hat OpenShift service on AWS places additional restrictions on where you can create resources and does not let you create the Kiali resource in a Red Hat managed namespace.

This means that the following common settings for spec.deployment.accessible_namespaces are not allowed in a ROSA cluster:

  • ['**'] (all namespaces)

  • default

  • codeready-*

  • openshift-*

  • redhat-*

The validation error message provides a complete list of all the restricted namespaces.

Example Kiali resource for ROSA
apiVersion: kiali.io/v1alpha1
kind: Kiali
metadata:
  name: kiali
  namespace: istio-system
spec:
  auth:
    strategy: openshift
  deployment:
    accessible_namespaces:   #restricted setting for ROSA
      - istio-system
    image_pull_policy: ''
    ingress_enabled: true
    namespace: istio-system

Additional resources

Red Hat OpenShift service Mesh supports multiple independent control planes within the cluster. You can create reusable configurations with serviceMeshControlPlane profiles. For more information, see Creating control plane profiles.

Next steps

Create a serviceMeshMemberRoll resource to specify the namespaces associated with the service Mesh. For more information, see Adding services to a service mesh.