Skip to main content
In this lesson you will use the Istio Operator (IstioOperator CR) to customize an Istio installation. The workflow covers:
  1. Inspecting the cluster and current workloads
  2. Creating a custom IstioOperator manifest (demo.yaml)
  3. Validating and applying the manifest with istioctl
  4. Verifying pods and resource overrides
  5. Enabling automatic sidecar injection and redeploying Bookinfo
This approach is preferable to using --set flags because it centralizes configuration in a declarative manifest that the operator will reconcile.

Prerequisites

  • kubectl configured to your target cluster
  • istioctl on your PATH
  • A running Kubernetes cluster with some sample workloads (e.g., Bookinfo)

1) Inspect cluster state

Example: the cluster already has Bookinfo pods running:
Verify istioctl can talk to the cluster:

2) Create a minimal IstioOperator manifest

Create and edit demo.yaml:
A minimal manifest that selects the demo profile:
Validate the manifest:
Install using the operator manifest:
Verify Istio system pods:
Inspect an ingress gateway pod to view resource requests/limits and environment. Example excerpt from kubectl describe pod:

Kubernetes Deployments cannot be renamed. To change the name of a gateway deployment managed by the operator you must disable the old gateway and enable a new one with the desired name. The operator will delete and recreate the deployment.

3) Example: Customize gateways and resource overrides

To change gateway names (e.g., add -gateway) and reduce resource sizes, update demo.yaml. The operator will handle removing disabled resources and creating the newly named ones. Example IstioOperator manifest (add to or replace your demo.yaml as needed):
Validate the updated manifest:
Upgrade/reconcile the installation (confirm y when prompted):
During rollout you will often see both old and new pods (old terminating, new running):
Verify resource overrides applied to the new ingress gateway:

The image shows a webpage from the Istio documentation, featuring sections on "ConfigMapKeySelector" and "ContainerResourceMetricSource" with corresponding tables detailing fields, types, and requirements. The page also includes a navigation menu on the right.

4) Enable automatic sidecar injection for your namespace

Check current namespaces and labels:
Analyze the namespace (suggests enabling injection if not enabled):
Enable injection:

5) Redeploy Bookinfo so pods get sidecar-injected

Delete any existing Bookinfo resources, then re-apply the sample manifest so the pods are recreated with the Istio sidecar:
During startup you will observe pods initializing and the init container running for proxy injection (READY changes from 0/2 to 2/2 once injection completes):
Eventually pods should reach 2/2 READY:

Notes on istioctl profile and operator fields

Recent istioctl releases removed the profile subcommand. If you run istioctl profile you may see:
Use the Operator API and the Istio documentation to find profile defaults, available fields, and examples. The operator supports configuration for: profiles, image hub/tag, revisions, components, meshConfig, and more.

Quick reference: common commands


That completes this demo on customizing Istio installations using the Istio Operator (IstioOperator CR).

Watch Video

Practice Lab