3.8.
3.8.1. 링크 복사링크가 클립보드에 복사되었습니다!
3.8.2. 링크 복사링크가 클립보드에 복사되었습니다!
3.8.2.1. 링크 복사링크가 클립보드에 복사되었습니다!
$ oc create configmap --from-file=<templates-directory> smcp-templates -n openshift-operators$ oc get clusterserviceversion -n openshift-operators | grep 'Service Mesh'maistra.v1.0.0 Red Hat OpenShift Service Mesh 1.0.0 Succeeded$ oc edit clusterserviceversion -n openshift-operators maistra.v1.0.0deployments: - name: istio-operator spec: template: spec: containers: volumeMounts: - name: discovery-cache mountPath: /home/istio-operator/.kube/cache/discovery - name: smcp-templates mountPath: /usr/local/share/istio-operator/templates/ volumes: - name: discovery-cache emptyDir: medium: Memory - name: smcp-templates configMap: name: smcp-templates ...apiVersion: maistra.io/v1 kind: ServiceMeshControlPlane metadata: name: minimal-install spec: template: default
3.8.3. 링크 복사링크가 클립보드에 복사되었습니다!
$ oc get deployment -n <namespace>oc get deployment -n info ratings-v1 -o yamlapiVersion: apps/v1 kind: Deployment metadata: name: ratings-v1 namespace: info labels: app: ratings version: v1 spec: template: metadata: labels: sidecar.istio.io/inject: 'true'참고$ oc apply -n <namespace> -f deployment.yaml$ oc apply -n info -f deployment-ratings-v1.yaml$ oc get deployment -n <namespace> <deploymentName> -o yaml$ oc get deployment -n info ratings-v1 -o yaml
3.8.4. 링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: apps/v1
kind: Deployment
metadata:
name: resource
spec:
replicas: 7
selector:
matchLabels:
app: resource
template:
metadata:
annotations:
sidecar.maistra.io/proxyEnv: "{ \"maistra_test_env\": \"env_value\", \"maistra_test_env_2\": \"env_value_2\" }"
3.8.5. 링크 복사링크가 클립보드에 복사되었습니다!
$ oc get cm -n istio-system istio -o jsonpath='{.data.mesh}' | grep disablePolicyChecks$ oc edit cm -n istio-system istio
3.8.5.1. 링크 복사링크가 클립보드에 복사되었습니다!
3.8.6. 링크 복사링크가 클립보드에 복사되었습니다!
3.8.6.1. 링크 복사링크가 클립보드에 복사되었습니다!
$ oc new-project info
apiVersion: maistra.io/v1 kind: ServiceMeshMemberRoll metadata: name: default spec: members: - info$ oc create -n istio-system -f servicemeshmemberroll-default.yaml
$ oc get smmr -n istio-system -o wideNAME READY STATUS AGE MEMBERS default 1/1 Configured 70s ["info"]$ oc apply -n info -f https://raw.githubusercontent.com/Maistra/istio/maistra-2.6/samples/bookinfo/platform/kube/bookinfo.yamlservice/details created serviceaccount/info-details created deployment.apps/details-v1 created service/ratings created serviceaccount/info-ratings created deployment.apps/ratings-v1 created service/reviews created serviceaccount/info-reviews created deployment.apps/reviews-v1 created deployment.apps/reviews-v2 created deployment.apps/reviews-v3 created service/productpage created serviceaccount/info-productpage created deployment.apps/productpage-v1 created$ oc apply -n info -f https://raw.githubusercontent.com/Maistra/istio/maistra-2.6/samples/bookinfo/networking/bookinfo-gateway.yamlgateway.networking.istio.io/info-gateway created virtualservice.networking.istio.io/info created$ export GATEWAY_URL=$(oc -n istio-system get route istio-ingressgateway -o jsonpath='{.spec.host}')
3.8.6.2. 링크 복사링크가 클립보드에 복사되었습니다!
$ oc apply -n info -f https://raw.githubusercontent.com/Maistra/istio/maistra-2.6/samples/bookinfo/networking/destination-rule-all.yaml$ oc apply -n info -f https://raw.githubusercontent.com/Maistra/istio/maistra-2.6/samples/bookinfo/networking/destination-rule-all-mtls.yamldestinationrule.networking.istio.io/productpage created destinationrule.networking.istio.io/reviews created destinationrule.networking.istio.io/ratings created destinationrule.networking.istio.io/details created
3.8.6.3. 링크 복사링크가 클립보드에 복사되었습니다!
$ oc get pods -n infoNAME READY STATUS RESTARTS AGE details-v1-55b869668-jh7hb 2/2 Running 0 12m productpage-v1-6fc77ff794-nsl8r 2/2 Running 0 12m ratings-v1-7d7d8d8b56-55scn 2/2 Running 0 12m reviews-v1-868597db96-bdxgq 2/2 Running 0 12m reviews-v2-5b64f47978-cvssp 2/2 Running 0 12m reviews-v3-6dfd49b55b-vcwpf 2/2 Running 0 12mecho "http://$GATEWAY_URL/productpage"
[D]
3.8.6.4. 링크 복사링크가 클립보드에 복사되었습니다!
3.8.6.4.1. 링크 복사링크가 클립보드에 복사되었습니다!
$ oc delete project info
3.8.6.4.2. 링크 복사링크가 클립보드에 복사되었습니다!
$ oc -n istio-system patch --type='json' smmr default -p '[{"op": "remove", "path": "/spec/members", "value":["'"info"'"]}]'
3.8.7. 링크 복사링크가 클립보드에 복사되었습니다!
$ curl "http://$GATEWAY_URL/productpage"$ export JAEGER_URL=$(oc get route -n istio-system jaeger -o jsonpath='{.spec.host}')echo $JAEGER_URL