Skip to content

Commit ba7293d

Browse files
committed
Explicitly document how to template manifests with both helm and istioctl and remove references to istioctl manifest diff
Signed-off-by: Benjamin Leggett <[email protected]>
1 parent bd4e137 commit ba7293d

File tree

3 files changed

+59
-46
lines changed

3 files changed

+59
-46
lines changed

Diff for: content/en/about/faq/setup/install-method-selection.md

+18-14
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,38 @@ The following lists some of the pros and cons of each of the available methods:
2323
- The `istioctl` command can set values automatically based on your running environment,
2424
thereby producing varying installations in different Kubernetes environments.
2525

26-
1. [istioctl manifest generate](/docs/setup/install/istioctl/#generate-a-manifest-before-installation)
26+
1. [Install using Helm](/docs/setup/install/helm/)
2727

28-
Generate the Kubernetes manifest and then apply with `kubectl apply --prune`.
29-
This method is suitable where strict auditing or augmentation of output manifests is needed.
28+
Using Helm charts allows easy integration with Helm based workflows and automated resource pruning during upgrades.
3029

3130
Pros:
3231

33-
- Resources are generated from the same `IstioOperator` API as used in `istioctl install`.
34-
- Uses the `IstioOperator` API which provides extensive configuration/customization options.
32+
- Familiar approach using industry standard tooling.
33+
- Helm native release and upgrade management.
3534

3635
Cons:
3736

38-
- Some checks performed in `istioctl install` are not done.
39-
- UX is less streamlined compared to `istioctl install`.
40-
- Error reporting is not as robust as `istioctl install` for the apply step.
37+
- Fewer checks and validations compared to `istioctl install`.
38+
- Some administrative tasks require more steps and have higher complexity.
4139

42-
1. [Install using Helm](/docs/setup/install/helm/)
40+
1. Pregenerated Kubernetes manifest
4341

44-
Using Helm charts allows easy integration with Helm based workflows and automated resource pruning during upgrades.
42+
- [Pregenerating Kubernetes manifests with `istioctl`](/docs/setup/install/istioctl/#generate-a-manifest-before-installation)
43+
- [Pregenerating Kubernetes manifests with `helm`](/docs/setup/install/helm/#generate-a-manifest-before-installation)
44+
45+
This method is suitable where strict auditing or augmentation of output manifests is required, or there are 3rd party tooling constraints.
4546

4647
Pros:
4748

48-
- Familiar approach using industry standard tooling.
49-
- Helm native release and upgrade management.
49+
- Easier to integrate with tooling that doesn't use `helm` or `istioctl`.
50+
- No installation tools required other than `kubectl`.
5051

5152
Cons:
5253

53-
- Fewer checks and validations compared to `istioctl install`.
54-
- Some administrative tasks require more steps and have higher complexity.
54+
- No install-time checks performed by either of the above methods are performed.
55+
- No installation management or upgrade capability is supported.
56+
- UX is less streamlined.
57+
- Error reporting duirng installation is not as robust.
58+
5559

5660
Installation instructions for all of these methods are available on the [Istio install page](/docs/setup/install).

Diff for: content/en/docs/setup/install/helm/index.md

+39
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,42 @@ To delete Istio CRDs installed in your cluster:
225225
{{< text syntax=bash snip_id=delete_crds >}}
226226
$ kubectl get crd -oname | grep --color=never 'istio.io' | xargs kubectl delete
227227
{{< /text >}}
228+
229+
## Generate a manifest before installation
230+
231+
You can generate the manifests for each component before installing Istio using the `helm template`
232+
sub-command.
233+
For example, use the following command to generate a `kubectl`-installable manifest for the `istiod` component:
234+
235+
{{< text bash >}}
236+
$ helm template istiod istio/istiod -n istio-system --kube-version <Kubernetes version of target cluster> > istiod.yaml
237+
{{< /text >}}
238+
239+
The generated manifest can be used to inspect what exactly is installed as well as to track changes to the manifest over time. Note that any additional flags or values overrides you would normally use for installation should also be supplied to the `helm template` command.
240+
241+
The following can be used to install that manifest, which will create the `istiod` component in the target cluster:
242+
243+
{{< text bash >}}
244+
$ kubectl apply -f istiod.yaml
245+
{{< /text >}}
246+
247+
Note that this alternative installation method may not apply the resources with the same sequencing of dependencies as `helm install` and is not tested in Istio releases.
248+
249+
{{< warning >}}
250+
If attempting to install and manage Istio using `helm template`, please note the following caveats:
251+
252+
1. The Istio namespace (`istio-system` by default) must be created manually.
253+
254+
1. While `helm install` will automatically detect environment specific settings from your Kubernetes context,
255+
`helm template` cannot as it runs offline, which may lead to unexpected results. In particular, you must ensure
256+
that you follow [these steps](/docs/ops/best-practices/security/#configure-third-party-service-account-tokens) if your
257+
Kubernetes environment does not support third party service account tokens.
258+
259+
1. `kubectl apply` of the generated manifest may show transient errors due to resources not being available in the
260+
cluster in the correct order.
261+
262+
1. `helm install` automatically prunes any resources that should be removed when the configuration changes (e.g.
263+
if you remove a gateway). This does not happen when you use `helm template` with `kubectl`, and these
264+
resources must be removed manually.
265+
266+
{{< /warning >}}

Diff for: content/en/docs/setup/install/istioctl/index.md

+2-32
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ not create the `istiod-default-validator` validating webhook configuration unles
142142
that you follow [these steps](/docs/ops/best-practices/security/#configure-third-party-service-account-tokens) if your
143143
Kubernetes environment does not support third party service account tokens.
144144

145+
Note that it is recommended to append `--cluster-specific` to your `istio manifest generate` command to detect the target cluster's environment, which will embed those cluster-specific environment settings into the generated manifests. This does require network access to a live cluster, however.
146+
145147
1. `kubectl apply` of the generated manifest may show transient errors due to resources not being available in the
146148
cluster in the correct order.
147149

@@ -151,38 +153,6 @@ resources must be removed manually.
151153

152154
{{< /warning >}}
153155

154-
## Show differences in manifests
155-
156-
You can show the differences in the generated manifests in a YAML style diff between the default profile and a
157-
customized install using these commands:
158-
159-
{{< text bash >}}
160-
$ istioctl manifest generate > 1.yaml
161-
$ istioctl manifest generate -f samples/operator/pilot-k8s.yaml > 2.yaml
162-
$ istioctl manifest diff 1.yaml 2.yaml
163-
Differences in manifests are:
164-
165-
166-
Object Deployment:istio-system:istiod has diffs:
167-
168-
spec:
169-
template:
170-
spec:
171-
containers:
172-
'[#0]':
173-
resources:
174-
requests:
175-
cpu: 500m -> 1000m
176-
memory: 2048Mi -> 4096Mi
177-
178-
179-
Object HorizontalPodAutoscaler:istio-system:istiod has diffs:
180-
181-
spec:
182-
maxReplicas: 5 -> 10
183-
minReplicas: 1 -> 2
184-
{{< /text >}}
185-
186156
## Verify a successful installation
187157

188158
You can check if the Istio installation succeeded using the `verify-install` command

0 commit comments

Comments
 (0)