Last active
May 12, 2022 20:06
-
-
Save rvennam/5b7856712ad8c6d12f3ccca5d3208a70 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl config use-context $CLUSTER1 | |
kubectl create ns gloo-mesh-test | |
kubectl label ns gloo-mesh-test istio-injection=enabled | |
cat <<EOF | oc -n gloo-mesh-test create -f - | |
apiVersion: "k8s.cni.cncf.io/v1" | |
kind: NetworkAttachmentDefinition | |
metadata: | |
name: istio-cni | |
EOF | |
oc adm policy add-scc-to-group anyuid system:serviceaccounts:gloo-mesh-test | |
kubectl apply -f https://raw.githubusercontent.com/istio/istio/master/samples/sleep/sleep.yaml -n gloo-mesh-test | |
kubectl apply -f https://raw.githubusercontent.com/istio/istio/master/samples/helloworld/helloworld.yaml -l service=helloworld -n gloo-mesh-test | |
kubectl apply -f https://raw.githubusercontent.com/istio/istio/master/samples/helloworld/helloworld.yaml -l version=v1 -n gloo-mesh-test | |
kubectl config use-context $CLUSTER2 | |
kubectl create ns gloo-mesh-test | |
kubectl label ns gloo-mesh-test istio-injection=enabled | |
cat <<EOF | oc -n gloo-mesh-test create -f - | |
apiVersion: "k8s.cni.cncf.io/v1" | |
kind: NetworkAttachmentDefinition | |
metadata: | |
name: istio-cni | |
EOF | |
oc adm policy add-scc-to-group anyuid system:serviceaccounts:gloo-mesh-test | |
kubectl apply -f https://raw.githubusercontent.com/istio/istio/master/samples/sleep/sleep.yaml -n gloo-mesh-test | |
kubectl apply -f https://raw.githubusercontent.com/istio/istio/master/samples/helloworld/helloworld.yaml -l service=helloworld -n gloo-mesh-test | |
kubectl apply -f https://raw.githubusercontent.com/istio/istio/master/samples/helloworld/helloworld.yaml -l version=v2 -n gloo-mesh-test | |
kubectl config use-context $CLUSTER1 | |
kubectl exec deploy/sleep -c sleep -n gloo-mesh-test -- curl -v http://helloworld.gloo-mesh-test.svc.cluster2.global:5000/hello | |
kubectl config use-context $CLUSTER2 | |
kubectl exec deploy/sleep -c sleep -n gloo-mesh-test -- curl -v http://helloworld.gloo-mesh-test.svc.cluster1.global:5000/hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.