This repository was archived by the owner on Jan 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 558
Refine Istio example #2819
Merged
Merged
Refine Istio example #2819
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
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 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 |
---|---|---|
@@ -1,25 +1,67 @@ | ||
# Kubernetes - Service Mesh | ||
|
||
There are numerous implementations of a service mesh which integrate with kubernetes such as Istio, [Linkerd](http://linkerd.io), and [Conduit](https://conduit.io/). [This is one blog post](https://medium.com/microservices-in-practice/service-mesh-for-microservices-2953109a3c9a) which explains some fundamentals behind what it is and why to use it. | ||
|
||
Some service mesh implementations **may** benefit from or require additional [customizations to the kubernetes cluster itself](https://github.com/Azure/acs-engine/blob/master/docs/clusterdefinition.md). | ||
|
||
## Istio | ||
|
||
The `istio.json` file in this directory enables the kubernetes API server options to support automatic sidecar injection using [Isitio](https://istio.io/). If automatic sidecar injection isn't enabled, then all services must then manually inject the sidecar configuration into every deployment, every time. | ||
|
||
The main changes this configuration makes is adding these flags to the apiserver `Initializers,MutatingAdmissionWebhook,ValidatingAdmissionWebhook` and starting using the `runtime-config` with `admissionregistration.k8s.io/v1alpha1`. | ||
|
||
> Note: The default acs-engine apiserver options `AlwaysPullImages` and `SecurityContextDeny` were removed from this configuration in order to have the Istio book info examples work without any errors. Consider enabling these for a production cluster. | ||
|
||
|
||
### Post installation | ||
|
||
Once the template has been successfully deployed, then Istio can be installed via either: | ||
|
||
1. Manual - follow the website [Installation steps](https://istio.io/docs/setup/kubernetes/quick-start.html#installation-steps). | ||
1. Helm Chart - is maintained in the Istio repository itself (no longer hub.kubeapps.com). [See these instructions on the Istio website](https://istio.io/docs/setup/kubernetes/helm.html). | ||
|
||
> Note: So far it seems the manual steps are more well maintained and up-to-date than the helm chart. | ||
|
||
# Kubernetes - Service Mesh | ||
|
||
There are numerous implementations of a service mesh which integrate with kubernetes such as Istio, [Linkerd](http://linkerd.io), and [Conduit](https://conduit.io/). [This is one blog post](https://medium.com/microservices-in-practice/service-mesh-for-microservices-2953109a3c9a) which explains some fundamentals behind what it is and why to use it. | ||
|
||
Some service mesh implementations **may** benefit from or require additional [customizations to the kubernetes cluster itself](https://github.com/Azure/acs-engine/blob/master/docs/clusterdefinition.md). | ||
|
||
## Istio | ||
|
||
The `istio.json` file in this directory enables the kubernetes API server options to support automatic sidecar injection using [Isitio](https://istio.io/). If automatic sidecar injection isn't enabled, then all services must then manually inject the sidecar configuration into every deployment, every time. | ||
|
||
The main changes this configuration makes is adding these flags to the apiserver `MutatingAdmissionWebhook,ValidatingAdmissionWebhook`. | ||
|
||
### Installation | ||
|
||
#### Create Azure Resources | ||
|
||
1. Create Resource Group | ||
|
||
``` | ||
az group create --name "<resourceGroupName>" --location "eastus" | ||
``` | ||
|
||
2. Create Service Principal | ||
|
||
``` | ||
az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>" | ||
``` | ||
|
||
#### Update istio.json | ||
|
||
3. Ensure `orchestratorRelease` is 1.9+. | ||
4. Update `--admission-control` to include `MutatingAdmissionWebhook,ValidatingAdmissionWebhook` | ||
|
||
**Note**: admission-controls need to be entered in the order defined on the kubernetes [docs](https://kubernetes.io/docs/admin/admission-controllers/#is-there-a-recommended-set-of-admission-controllers-to-use). | ||
|
||
Your updates should look like this. | ||
``` | ||
"orchestratorProfile": { | ||
"orchestratorType": "Kubernetes", | ||
"orchestratorRelease": "1.9", | ||
"kubernetesConfig": { | ||
"apiServerConfig": { | ||
"--admission-control": "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,DenyEscalatingExec,AlwaysPullImages,ValidatingAdmissionWebhook,ResourceQuota", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I encountered problems with some of the bookinfo examples deploying properly when you use DenyEscalatingExec and AlwaysPullImages. Did you test this out? If it causes errors, it might be good to at least mention this so people can consider to enable them or not. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I had no problems leaving these enabled. |
||
} | ||
} | ||
} | ||
``` | ||
|
||
4. Add Service Principal ID and Secret | ||
``` | ||
"servicePrincipalProfile": { | ||
"clientId": "<Insert Service Principal Client ID>", | ||
"secret": "<Insert Service Principal Client Secret>" | ||
} | ||
``` | ||
|
||
|
||
### Post installation | ||
|
||
Once the template has been successfully deployed, then Istio can be installed via either: | ||
|
||
1. Manual - follow the website [Installation steps](https://istio.io/docs/setup/kubernetes/quick-start.html#installation-steps). | ||
1. Helm Chart - is maintained in the Istio repository itself (no longer hub.kubeapps.com). [See these instructions on the Istio website](https://istio.io/docs/setup/kubernetes/helm.html). | ||
|
||
> Note: So far it seems the manual steps are more well maintained and up-to-date than the helm chart. | ||
|
||
After Istio has been installed, consider [walking through the various Tasks](https://istio.io/docs/tasks/) which use the Book info example application. |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, I would leave this stuff for the main walkthrough so it doesn't have to be maintained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wesyao Since you wrote these changes, what are your thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jackfrancis @dtzar @billpratt Sorry about the delay, I was waiting for others to chime in. I think it would be good to have now and we can remove this when it is repetitive? What do you guys think?