oci-series

A git repo with Oracle Cloud Infrastructure recipes, tips and tricks.

This project is maintained by luisw19

Istio installation in Oracle Container Engine for Kubernetes

This recipe details how to install Istio in OKE with Prometheus, Grafana, Jaeger and Kiali. The recipe also shows how to enable TLS security using Secret Discovery.

Note that the following Istio installation is based on Helm using Mac. Check this link to provision a new Kubernetes Cluster in OCI if an instance is not already available. This installation has been tested with Istio version 1.2.5.

1) Grant the Kubernetes RBAC cluster-admin clusterrole to a OCI user based on the user’s Oracle Cloud Identifier (OCID).

To obtain the OCID open the OCI Console and from there click on the menu option Identity > Users. Then click on show under the username and take note of the OID.

  kubectl create clusterrolebinding sttc_admin --clusterrole=cluster-admin --user=ocid1.user.oc1..aaaaaaaazhciwyt5kooopvnovupyao7v7a73imsvxoqrb2omojbcvcxpgvrq

2) Download Istio’s latest release

3) Set $ISTIO_HOME and add the istioctl to the path in case required.

istioctl is used when manually injecting Envoy as a sidecar proxy.

4) Helm installation and Tiller installation:

5) Create the istio-system namespaces

kubectl create namespace istio-system

6) Create a secret for Kiali

This is required as Kiali expects the secret to be present.

7) Install the istio-init Helm chart to bootstrap all the Istio’s Custom Resource Definitions (CRDs)

helm install "$ISTIO_HOME/install/kubernetes/helm/istio-init" --name istio-init --namespace istio-system \
--set certmanager.enabled=true

Verify that all 28 CRDs were created:

kubectl get crds | grep 'istio.io\|certmanager.k8s.io' | wc -l

Note that it may take a few seconds to complete so you may need to run the command multiple times.

8) Install Istio with Helm the desired confirmation profile.

9) For Istio automatic injection of Envoy side-cars to work the label istio-injection=enabled has to be set to the target namespaces as following:

10) From the same namespace where istio-injection was enabled, deploy the Pods and verify that the Istio side-cars are being attached correctly:

11) Create the Istio Ingress Gateway and Virtual Service

12) Istio Ingress TLS configuration for adding HTTPS support (based on Secret Discovery)

Note that Istio provides 2 approaches to add TLS support in the Ingress Gateways. The first one is based on a File Mount and the second one using Secret Discovery. Whereas both are approaches are fairly straight forward, when having to support multiple hosts (e.g. several subdomains) the Secret Discovery approach is simpler to implement as it won’t require to re-deploy the istio-ingressgateway.

When prompted enter further details as desired, for example:

  Country Name (2 letter code) []:GB
  State or Province Name (full name) []:Warwickshire
  Locality Name (eg, city) []:Leamington
  Organization Name (eg, company) []:STTC
  Organizational Unit Name (eg, section) []:Orders
  Common Name (eg, fully qualified host name) []:httpbin.adomain.com
  Email Address []:me@adomain.com

Once completed this should generate the httpbin.adomain.com.crt and httpbin.adomain.com.key files.

Note that Common Name is a domain name and should match the Hosts value in the Ingress Gateway.

13) Access the monitoring services via port-forwarding as following:

Check this page for more details.

14) Other useful tips: