istio

by Helm

Helm chartv1.1.0App 1.1.0Apache-2.0

Helm chart for all istio components

About this chart

Istio

Istio is an open platform for providing a uniform way to integrate microservices, manage traffic flow across microservices, enforce policies and aggregate telemetry data.

Introduction

This chart bootstraps all istio components deployment on a Kubernetes cluster using the Helm package manager.

Chart Details

This chart can install multiple istio components as subcharts:

  • ingress
  • ingressgateway
  • egressgateway
  • sidecarInjectorWebhook
  • galley
  • mixer
  • pilot
  • security(citadel)
  • grafana
  • prometheus
  • servicegraph
  • tracing(jaeger)
  • kiali

To enable or disable each component, change the corresponding enabled flag.

Prerequisites

  • Kubernetes 1.9 or newer cluster with RBAC (Role-Based Access Control) enabled is required
  • Helm 2.7.2 or newer or alternately the ability to modify RBAC rules is also required
  • If you want to enable automatic sidecar injection, Kubernetes 1.9+ with admissionregistration API is required, and kube-apiserver process must have the admission-control flag set with the MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controllers added and listed in the correct order.

Resources Required

The chart deploys pods that consume minimum resources as specified in the resources configuration parameter.

Installing the Chart

  1. If a service account has not already been installed for Tiller, install one:
$ kubectl apply -f install/kubernetes/helm/helm-service-account.yaml
  1. Install Tiller on your cluster with the service account:
$ helm init --service-account tiller
  1. Install Istio’s Custom Resource Definitions via kubectl apply, and wait a few seconds for the CRDs to be committed in the kube-apiserver:

    $ kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml
    

    Note: If you are enabling certmanager, you also need to install its CRDs and wait a few seconds for the CRDs to be committed in the kube-apiserver:

    $ kubectl apply -f install/kubernetes/helm/istio/charts/certmanager/templates/crds.yaml
    
  2. If you are enabling kiali, you need to create the secret that contains the username and passphrase for kiali dashboard:

    $ echo -n 'admin' | base64
    YWRtaW4=
    $ echo -n '1f2d1e2e67df' | base64
    MWYyZDFlMmU2N2Rm
    $ NAMESPACE=istio-system
    $ cat <<EOF | kubectl apply -f -
    apiVersion: v1
    kind: Secret
    metadata:
      name: kiali
      namespace: $NAMESPACE
      labels:
        app: kiali
    type: Opaque
    data:
      username: YWRtaW4=
      passphrase: MWYyZDFlMmU2N2Rm
    EOF
    
  3. If you are using security mode for Grafana, create the secret first as follows:

Encode username, you can chage the username to the name as you want:

$ echo -n 'admin' | base64
YWRtaW4=

Encode passphrase, you can chage the passphrase to the passphrase as you want:

$ echo -n '1f2d1e2e67df' | base64
MWYyZDFlMmU2N2Rm

Set the namespace where Istio was installed:

$ NAMESPACE=istio-system

Create secret for Grafana:

$ cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
  name: grafana
  namespace: $NAMESPACE
  labels:
    app: grafana
type: Opaque
data:
  username: YWRtaW4=
  passphrase: MWYyZDFlMmU2N2Rm
EOF
  1. To install the chart with the release name istio in namespace istio-system:

    $ helm install install/kubernetes/helm/istio --name istio --namespace istio-system
    
    • Without the sidecar injection webhook:
    $ helm install install/kubernetes/helm/istio --name istio --namespace istio-system --set sidecarInjectorWebhook.enabled=false
    

Configuration

The Helm chart ships with reasonable defaults. There may be circumstances in which defaults require overrides. To override Helm values, use --set key=value argument during the helm install command. Multiple --set operations may be used in the same Helm operation.

Helm charts expose configuration options which are currently in alpha. The currently exposed options are explained in the following table:

ParameterDescriptionValuesDefault
global.hubSpecifies the HUB for most images used by Istioregistry/namespacedocker.io/istio
global.tagSpecifies the TAG for most images used by Istiovalid image tag0.8.latest
global.proxy.imageSpecifies the proxy image namevalid proxy nameproxyv2
global.proxy.concurrencySpecifies the number of proxy worker threadsnumber, 0 = auto0
global.imagePullPolicySpecifies the image pull policyvalid image pull policyIfNotPresent
global.controlPlaneSecurityEnabledSpecifies whether control plane mTLS is enabledtrue/falsefalse
global.mtls.enabledSpecifies whether mTLS is enabled by default between servicestrue/falsefalse
global.rbacEnabledSpecifies whether to create Istio RBAC rules or nottrue/falsetrue
global.refreshIntervalSpecifies the mesh discovery refresh intervalinteger followed by s10s
global.arch.amd64Specifies the scheduling policy for amd64 architectures0 = never, 1 = least preferred, 2 = no preference, 3 = most preferred2
global.arch.s390xSpecifies the scheduling policy for s390x architectures0 = never, 1 = least preferred, 2 = no preference, 3 = most preferred2
global.arch.ppc64leSpecifies the scheduling policy for ppc64le architectures0 = never, 1 = least preferred, 2 = no preference, 3 = most preferred2
ingress.enabledSpecifies whether Ingress should be installedtrue/falsetrue
gateways.istio-ingressgateway.enabledSpecifies whether Ingress gateway should be installedtrue/falsetrue
gateways.istio-egressgateway.enabledSpecifies whether Egress gateway should be installedtrue/falsetrue
sidecarInjectorWebhook.enabledSpecifies whether automatic sidecar-injector should be installedtrue
galley.enabledSpecifies whether Galley should be installed for server-side config validationtrue/falsetrue
mixer.enabledSpecifies whether Mixer should be installedtrue/falsetrue
pilot.enabledSpecifies whether Pilot should be installedtrue/falsetrue
grafana.enabledSpecifies whether Grafana addon should be installedtrue/falsefalse
grafana.persistSpecifies whether Grafana addon should persist config datatrue/falsefalse
grafana.storageClassNameIf grafana.persist is true, specifies the StorageClass to use for the PersistentVolumeClaimStorageClass""
prometheus.enabledSpecifies whether Prometheus addon should be installedtrue/falsetrue
servicegraph.enabledSpecifies whether Servicegraph addon should be installedtrue/falsefalse
tracing.enabledSpecifies whether Tracing(jaeger) addon should be installedtrue/falsefalse
kiali.enabledSpecifies whether Kiali addon should be installedtrue/falsefalse

Uninstalling the Chart

To uninstall/delete the istio release:

$ helm delete istio

The command removes all the Kubernetes components associated with the chart and deletes the release.

To uninstall/delete the istio release completely and make its name free for later use:

$ helm delete istio --purge

Deploy istio with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has istio on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartistio is pinned at v1.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply