Created
February 3, 2021 15:30
-
-
Save rvennam/1cdcc1e212b66f2893dceef9084954c7 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
# Start clean | |
istioctl x uninstall --purge -y | |
sleep 20s | |
kubectl delete namespace custom-gateways | |
sleep 30s | |
# Download Istio 1.8.2 | |
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.8.2 sh - | |
cd istio-1.8.2 | |
# Install Istio 1.8.1 Opeartor | |
./bin/istioctl operator init --tag 1.8.1 | |
sleep 20s | |
# Install Istio 1.8.1 | |
kubectl create ns istio-system | |
kubectl apply -f - <<EOF | |
apiVersion: install.istio.io/v1alpha1 | |
kind: IstioOperator | |
metadata: | |
namespace: istio-system | |
name: example-istiocontrolplane | |
spec: | |
profile: default | |
EOF | |
sleep 60s | |
# Check that istiod and default gateway is at 1.8.1 | |
kubectl get pods -n istio-system -o jsonpath="{.items[*].spec.containers[*].image}" | |
# Install additinal 1.8.1 gateway in new namespace | |
kubectl create namespace custom-gateways | |
kubectl apply -f - <<EOF | |
apiVersion: install.istio.io/v1alpha1 | |
kind: IstioOperator | |
metadata: | |
name: custom-ingressgateway-iop | |
namespace: istio-system | |
spec: | |
profile: empty | |
tag: 1.8.1 # NOTE! | |
components: | |
ingressGateways: | |
- name: custom-ingressgateway | |
label: | |
istio: custom-ingressgateway | |
namespace: custom-gateways | |
enabled: true | |
EOF | |
sleep 30s | |
# Check to see if 1.8.1 gateway is installed | |
kubectl get pods -n custom-gateways -o jsonpath="{.items[*].spec.containers[*].image}" | |
## TEST THAT CUSTOM GATEWAY IS WORKING BY SENDING TRAFFIC | |
## ... | |
# Update Istio operator to 1.8.2 | |
./bin/istioctl operator init --tag 1.8.2 | |
sleep 60s | |
# Check that istiod and default gateway is updated to 1.8.2 | |
kubectl get pods -n istio-system -o jsonpath="{.items[*].spec.containers[*].image}" | |
# Check that custom gateway is still to 1.8.1 | |
kubectl get pods -n custom-gateways -o jsonpath="{.items[*].spec.containers[*].image}" | |
## TEST THAT CUSTOM GATEWAY 1.8.1 IS WORKING BY SENDING TRAFFIC | |
## ... | |
# Update custom gateway to 1.8.2 | |
kubectl apply -f - <<EOF | |
apiVersion: install.istio.io/v1alpha1 | |
kind: IstioOperator | |
metadata: | |
name: custom-ingressgateway-iop | |
namespace: istio-system | |
spec: | |
profile: empty | |
tag: 1.8.2 # NOTE! | |
components: | |
ingressGateways: | |
- name: custom-ingressgateway | |
label: | |
istio: custom-ingressgateway | |
namespace: custom-gateways | |
enabled: true | |
EOF | |
# Check that custom gateway is upgraded to 1.8.2 | |
kubectl get pods -n custom-gateways -o jsonpath="{.items[*].spec.containers[*].image}" | |
## TEST THAT CUSTOM GATEWAY 1.8.2 IS WORKING BY SENDING TRAFFIC | |
## ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment