4 of OpenShift command environment to create Service Mesh

This article use the command line to create a Service Mesh Operating Environment on OpenShift 4, and then verified.
Creating Service Mesh Operating Environment graphically see "OpenShift Service Mesh 4 of Getting Started."

Creating ServiceMesh environment

  1. Service Mesh confirmation can be found in the relevant Operator.
$ oc get packagemanifests {servicemeshoperator,kiali-ossm,jaeger-product,elasticsearch-operator} -n openshift-marketplace
NAME                     CATALOG             AGE
servicemeshoperator      Red Hat Operators   17d
kiali-ossm               Red Hat Operators   17d
jaeger-product           Red Hat Operators   17d
elasticsearch-operator   Red Hat Operators   17d
  1. Create a subscription Service Mesh Operator's (which automatically creates other Operator dependent).
$ cat > service-mesh-subscription.yaml << EOF
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: servicemeshoperator
  namespace: openshift-operators
spec:
  channel: "1.0"
  name: servicemeshoperator
  source: redhat-operators
  sourceNamespace: openshift-marketplace
EOF
$ oc apply -f service-mesh-subscription.yaml
$ oc get sub -n openshift-operators
NAME                                                                PACKAGE                  SOURCE             CHANNEL
elasticsearch-operator-4.2-redhat-operators-openshift-marketplace   elasticsearch-operator   redhat-operators   4.2
jaeger-product-stable-redhat-operators-openshift-marketplace        jaeger-product           redhat-operators   stable
kiali-ossm-stable-redhat-operators-openshift-marketplace            kiali-ossm               redhat-operators   stable
servicemeshoperator                                                 servicemeshoperator      redhat-operators   1.0```
  1. Create a project run istio resources.
$ oc new-project istio-system
  1. Creating ServiceMeshControlPlane istio of.
$ cat > istio-installation.yaml << EOF
---
apiVersion: maistra.io/v1
kind: ServiceMeshControlPlane
metadata:
  name: basic-install
spec:
  istio:
    gateways:
      istio-egressgateway:
        autoscaleEnabled: false
      istio-ingressgateway:
        autoscaleEnabled: false
    mixer:
      policy:
        autoscaleEnabled: false
      telemetry:
        autoscaleEnabled: false
    pilot:
      autoscaleEnabled: false
      traceSampling: 100
    kiali:
      enabled: true
    grafana:
      enabled: true
    tracing:
      enabled: true
      jaeger:
        template: all-in-one
EOF
$ oc create -n istio-system -f istio-installation.yaml
servicemeshcontrolplane.maistra.io/basic-install created
$ oc get smcp -n istio-system
NAME            READY
basic-install   
  1. Create a schedule to view the Pod, and finally 12 Pod will be as follows.
$ oc get pod
NAME                                     READY   STATUS    RESTARTS   AGE
grafana-56f9c8b54-7wblr                  2/2     Running   0          2m28s
istio-citadel-5d5c8687df-t4v98           1/1     Running   0          5m44s
istio-egressgateway-6686d54c49-9s28v     1/1     Running   0          3m8s
istio-galley-86d9d8d49b-dztvj            1/1     Running   0          4m55s
istio-ingressgateway-56857ff7f7-vfg6k    1/1     Running   0          3m8s
istio-pilot-fb5f78c44-blz2x              2/2     Running   0          3m55s
istio-policy-56c77687b5-7zj8w            2/2     Running   0          4m32s
istio-sidecar-injector-b6985f8b8-slhxr   1/1     Running   0          2m54s
istio-telemetry-775f7df579-8fgnt         2/2     Running   0          4m32s
jaeger-57776787bc-8chlt                  2/2     Running   0          4m58s
kiali-967b567b6-crdch                    1/1     Running   0          98s
prometheus-6488c47945-d2wwr              2/2     Running   0          5m26s
  1. Creating ServiceMeshMemberRoll istio of.
$ cat > servicemeshmemberroll-default.yaml << EOF
---
apiVersion: maistra.io/v1
kind: ServiceMeshMemberRoll
metadata:
  name: default
  namespace: istio-system
spec:
  members:
    # a list of projects joined into the service mesh
    - default
EOF
$ oc create -n istio-system -f servicemeshmemberroll-default.yaml
servicemeshmemberroll.maistra.io/default created

At this point, based on Istio of Service Mesh environment is ready. When used with Istio application, we can modify ServiceMeshMemberRoll configuration, where the application will be added to the project Istio member can be.

Published 54 original articles · won praise 0 · Views 1105

Guess you like

Origin blog.csdn.net/weixin_43902588/article/details/103757837
Recommended