-
Notifications
You must be signed in to change notification settings - Fork 11
docs: add Istio tutorial #318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dstathis
wants to merge
4
commits into
main
Choose a base branch
from
istio-tutorial
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| # How to migrate from Traefik to Istio | ||
|
|
||
| In this guide, you will learn how to migrate the Canonical Observability Stack from using Traefik as its ingress to | ||
| using Istio. Istio is a service mesh which allows you to secure and control all the network traffic on your cluster. | ||
| For more info on Istio, you can [browse the docs](https://canonical-service-mesh-documentation.readthedocs-hosted.com/latest/). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| * [Kubernetes](https://documentation.ubuntu.com/canonical-kubernetes/latest/) | ||
| * [Juju](https://documentation.ubuntu.com/juju/) | ||
| * The [Canonical Observability Stack](https://documentation.ubuntu.com/observability) | ||
|
|
||
| ```{note} | ||
| The Istio charms work with Microk8s out of box. If you are using Canonical Kubernetes, see [these instructions](https://canonical-service-mesh-documentation.readthedocs-hosted.com/latest/how-to/use-charmed-istio-with-canonical-kubernetes/). If you are using any other flavor of Kubernetes, see the [Istio docs](https://istio.io/latest/docs/setup/platform-setup/). | ||
| ``` | ||
|
|
||
| ```{note} | ||
| COS 2 does not have support for service mesh. To use service mesh, you must deploy cos from track 3 or greater or from dev. | ||
| ``` | ||
|
|
||
| ## Steps | ||
|
|
||
| * Install Istio on the cluster | ||
|
|
||
| ```{code} bash | ||
| juju add-model istio-system | ||
| juju deploy istio-k8s istio --channel dev/edge --trust | ||
| ``` | ||
| Once the charm settles, Your cluster is ready to use Istio. | ||
|
|
||
| * Switch back to the cos model | ||
|
|
||
| ```{code} bash | ||
| juju switch cos | ||
| ``` | ||
|
|
||
| * Remove the Traefik charm | ||
|
|
||
| ```{code} bash | ||
| juju remove-application traefik | ||
| ``` | ||
|
|
||
| * Now we install the istio-beacon charm. By relating all of the COS apps to the beacon, we put them on the mesh so that their network traffic becomes controlled by Istio. | ||
|
|
||
| ```{code} bash | ||
| juju deploy istio-beacon-k8s istio-beacon --channel dev/edge --trust | ||
| juju integrate istio-beacon:service-mesh alertmanager | ||
| juju integrate istio-beacon:service-mesh catalogue | ||
| juju integrate istio-beacon:service-mesh grafana | ||
| juju integrate istio-beacon:service-mesh loki | ||
| juju integrate istio-beacon:service-mesh mimir | ||
| juju integrate istio-beacon:service-mesh otelcol | ||
| juju integrate istio-beacon:service-mesh tempo | ||
| ``` | ||
| You will need to wait a while for the model to settle but it should all reach active/idle eventually. | ||
|
|
||
| * Now all of our charms are on the mesh, but we still have no ingress set up. So we install the istio-ingress charm. | ||
|
|
||
| ```{code} bash | ||
| juju deploy istio-ingress-k8s istio-ingress --channel dev/edge --trust | ||
| juju relate istio-ingress:ingress alertmanager | ||
| juju relate istio-ingress:ingress catalogue | ||
| juju relate istio-ingress:ingress grafana | ||
| juju relate istio-ingress:ingress loki | ||
| juju relate istio-ingress:ingress mimir | ||
| juju relate istio-ingress:istio-ingress-route otelcol | ||
| juju relate istio-ingress:istio-ingress-route tempo | ||
| ``` | ||
| Once again you will need to wait some time for this to settle. | ||
|
|
||
| * Your migration is not complete. To make sure everything is working navigate to `http://\<ingress-adress\>/cos-catalogue` and check that everything is still working. | ||
|
|
||
| * To view all of the network policies created, view the authorization policies | ||
|
|
||
| ```{code} bash | ||
| kubectl get ap | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.