Skip to content

Instantly share code, notes, and snippets.

View rvennam's full-sized avatar

Ram Vennam rvennam

View GitHub Profile
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: travelapp
spec:
hosts:
- travelapp
http:
- route:
- destination:
apiVersion: install.istio.io/v1alpha2
kind: IstioControlPlane
metadata:
name: managed-istiocontrolplane
namespace: istio-operator
spec:
profile: default
echo "====== Cleaning"
kubectl -n istio-operator get IstioControlPlane example-istiocontrolplane -o=json | jq '.metadata.finalizers = null' | kubectl delete -f -
kubectl -n istio-operator get IstioControlPlane managed-istiocontrolplane -o=json | jq '.metadata.finalizers = null' | kubectl delete -f -
sleep 60
kubectl delete ns istio-operator --grace-period=0 --force
kubectl delete ns istio-system --grace-period=0 --force
sleep 30
echo "====== Installing Operator"
kubectl apply -f https://istio.io/operator.yaml
apiVersion: install.istio.io/v1alpha2
kind: IstioControlPlane
metadata:
name: example-istiocontrolplane
namespace: istio-operator
spec:
hub: docker.io/sdake
tag: sdake
profile: default
configManagement:
apiVersion: install.istio.io/v1alpha2
kind: IstioControlPlane
spec:
trafficManagement:
enabled: false
policy:
enabled: false
telemetry:
enabled: false
security:
echo "Install Istio 1.4"
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.4.5 sh -
cd istio-1.4.5
./bin/istioctl manifest apply --set profile=default
kubectl label namespace default istio-injection=enabled
sleep 120s
kubectl get pods -n istio-system
export CLUSTER=istio6
echo "Install Istio 1.4"
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.4.5 sh -
cd istio-1.4.5
ibmcloud ks cluster addon enable istio -c $CLUSTER
kubectl label namespace default istio-injection=enabled
sleep 120s
echo "### Downloading both versions of Istio"
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.4.6 sh -
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.5.1 sh -
echo "### Uninstall sleep"
kubectl delete deployment sleep -n default
kubectl delete -f ./test-egress-gateway.yaml
# Preparation
ibmcloud ks cluster config --cluster mc1
ibmcloud ks cluster config --cluster mc2
export MAIN_CLUSTER_CTX=mc1/bp8qqdkd09bld02i62r0
export REMOTE_CLUSTER_CTX=mc2/bp8qqkmd0rgc3c2i62rg
export MAIN_CLUSTER_NAME=main0
export REMOTE_CLUSTER_NAME=remote0
#!/bin/bash
set -x #echo on
## PREREQ: SET CONTEXTS for management-plane-context and remote-cluster-context
#### Cleanup
kubectl config use-context management-plane-context
meshctl uninstall
kubectl -n service-mesh-hub delete secret -l solo.io/kubeconfig=true
kubectl delete istiooperator istiocontrolplane-default -n istio-operator --context management-plane-context