istio-upgrades
What's the point of this repository?
To help simulate the upgrade from Istio 1.3
-> 1.4
-> 1.6
What's in this respository?
Resources from the istio
repoistory (including resources from different versions) have been added to help reduce bandwidth requirements. The bookinfo sample is also included to help simulate an application.
How do you execute the upgrade strategy?
Prerequisites
- Docker Desktop a. you'll need to allow at least 8Gb memory
- kind
- kubectl
- Helm v2 supplied through asdf
Steps
- Initial setup:
$ make setup
What does this do?
- Creates a kind cluster and installs kubernetes
1.5.11
- Install
Istio
version1.3.3
usingHelm v2
- Install the
bookinfo
sample application
This should allow you to access the bookinfo
sample project from your browser - bookinfo
- Upgrade
Istio
to1.4.10
$ make upgrade-istio-to-1.4.10
What does this do?
- Performs a Helm upgrade to the newer
istio-init
chart - Performs a Helm upgrade to the newer
istio
chart
- Upgrade
Istio
to1.6.13
$ make upgrade-istio-to-1.6.13
What does this do?
- Patch the
istio-galley
deployment to disable validation. - Delete the
istio-galley
validating webhook should one exist. - Download the versiob
1.6.13
of theistioctl
binary from GitHub. - Initialise the istio operator using
istioctl
. - Create a default instance of an Istio Operator.
- Label the default namespace with
istio.io/rev=1-6-13
to point to the latest1.6.13
revision and remove theistio-injection
label. - Scale down the deployments managed by Helm from the previous release (At this point we need to prevent the
istio-ingressgateway
from being scaled down as we use this as our ingress"). - Perform a restart of all deployments in the
default
namespace. - Patch the
istio-ingressgateway
, replace thenodePort
values for the HTTP & HTTPS port mappings (this ensures we can still access the sample app due to the fixed port mapping kind cluster configuration).
How do I view the sample app?
curl http://localhost/productpage
or Navigate to http://localhost/productpage in your browser.
How to I view a Graph of the traffic flow?
$ ./istio/1.6.13/istioctl dashboard kiali
Useful commands during upgrade
kubectl get pods -n istio-system
kubectl get pods -n istio-operator
kubectl get pods -n default
curl -s -o /dev/null -w %{http_code} http://127.0.0.1/productpage
Istio 1.3.3
./istio/1.3.3/istioctl version
./istio/1.3.3/istioctl ps
./istio/1.3.3/istioctl verify-install
./istio/1.3.3/istioctl dashboard kiali
Istio 1.4.10
./istio/1.4.10/istioctl version
./istio/1.4.10/istioctl ps
./istio/1.4.10/istioctl dashboard kiali
Istio 1.6.13
./istio/1.6.13/istioctl version
./istio/1.6.13/istioctl ps
./istio/1.6.13/istioctl analyze
./istio/1.6.13/istioctl verify-install
./istio/1.6.13/istioctl dashboard kiali
References
- https://istio.io/v1.3/docs/setup/install/helm/#option-2-install-with-helm-and-tiller-via-helm-install
- https://istio.io/v1.4/docs/setup/upgrade/cni-helm-upgrade/
- https://istio.io/v1.6/docs/setup/upgrade/#upgrading-from-1.4
- https://github.com/istio/istio/tree/master/samples/bookinfo
Troubleshooting
Should the bookinfo applications be unavailable when attempting to navigate to them via http://localhost/productpage then it might be that the nodePort has been updated within the istio-ingressgateway
service within the istio-system
namespace. Execute the following to update the nodePort values:
kubectl -n istio-system patch service istio-ingressgateway --type='json' -p '[{"op":"replace","path":"/spec/ports/1/nodePort","value":31380},{"op":"replace","path":"/spec/ports/2/nodePort","value":31390}]'