Expose Istio¶
In this section you will expose Istio and the services running behind it using the NGINX Ingress Controller.
Fast Forward
If you have already exposed Istio for serving, expand this box to fast-forward.
- Proceed to the Verify section.
Overview
What You’ll Need¶
- A configured management environment.
- Your clone of the Arrikto GitOps repository.
- An existing AKS cluster.
- A working cert-manager deployment.
- A working NGINX Ingress Controller deployment.
Procedure¶
Go to your GitOps repository, inside your
rok-toolsmanagement environment:root@rok-tools:/# cd ~/ops/deploymentsCompute the subdomain to use for serving:
root@rok-tools:~/ops/deployments# export SERVING_SUBDOMAIN=${SERVING_AZURELB_DNS_NAME_LABEL?}.${AZURE_DEFAULTS_LOCATION?}.cloudapp.azure.com && echo ${SERVING_SUBDOMAIN?} arrikto-cluster-serving.eastus.cloudapp.azure.comSpecify the NGINX class to use. Choose one of the following options based on which NGINX you are using:
The Serving NGINX is used by default. Continue with next step.
Edit
rok/expose-serving/overlays/deploy/kustomization.yamland enable theingress-classpatch:patches: ... - path: patches/ingress-class.yamlEdit
rok/expose-serving/overlays/deploy/kustomization.yamland enable thexffpatch:patches: ... - path: patches/xff.yaml target: kind: EnvoyFilter name: xff-trust-hopsEdit
rok/expose-serving/overlays/deploy/patches/xff.yamland setvalueforxff_num_trusted_hopsto1:value: 1Note
Azure LB is a TCP proxy and as such we have one L7 proxy in from of Istio: NGINX.
Edit
rok/expose-serving/overlays/deploy/kustomization.yamland enable theingress-hostandingress-tlspatches by uncommenting the corresponding snippet. The final result will look like this:patches: - path: patches/ingress-host.yaml target: kind: Ingress name: istio-ingress - path: patches/ingress-tls.yamlEdit
rok/expose-serving/overlays/deploy/patches/ingress-host.yamland setvalueto your subdomain from step 2:- op: replace path: /spec/rules/0/host value: "*.arrikto-cluster-serving.eastus.cloudapp.azure.com"Note
Use your wildcard subdomain.
Edit
rok/expose-serving/overlays/deploy/patches/ingress-tls.yamland sethoststo your subdomain:spec: tls: - hosts: - "*.arrikto-cluster-serving.eastus.cloudapp.azure.com"Note
Use your wildcard subdomain.
Edit
rok/expose-serving/overlays/deploy/kustomization.yamland enable thecertificateresource:resources: ... - ../../base/certificate.yamlEdit
rok/expose-serving/overlays/deploy/patches/certificate.yamland set bothcommonNameanddnsNamesto your subdomain:spec: commonName: arrikto-cluster-serving.eastus.cloudapp.azure.com dnsNames: - arrikto-cluster-serving.eastus.cloudapp.azure.com - "*.arrikto-cluster-serving.eastus.cloudapp.azure.com"Note
Include your wildcard subdomain in
dnsNamesas well.Commit your changes:
root@rok-tools:~/ops/deployments# git commit -am "Expose Istio via an NGINX Ingress"Apply the kustomization:
root@rok-tools:~/ops/deployments# rok-deploy --apply rok/expose-serving/overlays/deployEdit
kubeflow/manifests/common/knative/knative-serving/overlays/deploy/patches/config-domain.yamlto configure Knative to use your domain for External URLs. Replacearrikto-cluster-serving.eastus.cloudapp.azure.comwith your subdomain:data: arrikto-cluster-serving.eastus.cloudapp.azure.com: "" # <-- Update this line.Commit your changes:
root@rok-tools:~/ops/deployments# git commit -am "Configure Knative domain"Apply the kustomization:
root@rok-tools:~/ops/deployments# rok-deploy --apply \ > kubeflow/manifests/common/knative/knative-serving/overlays/deploy
Important
You have to create the wildcard DNS record manually, e.g., an A record pointing to the address of your Azure Load Balancer, or connect to your Azure Load Balancer directly using its FQDN and pass the correct Host header.
Verify¶
Verify that you have successfully created the Ingress object for Istio. The HOSTS field should match your wildcard subdomain:
root@rok-tools:~/ops/deployments# kubectl get ingress -n knative-serving NAME HOSTS ADDRESS PORTS AGE knative-serving-ingress *.arrikto-cluster-serving.eastus.cloudapp.azure.com 10.42.42.42 80 1m
What’s Next¶
Optionally, you can integrate Rok and Arrikto EKF with external platforms or projects.