Configure Istio Ingress Gateway
Until now, you used a Kubernetes Ingress to access your application from the outside. In this module, you configure the traffic to enter through an Istio ingress gateway, in order to apply Istio control on traffic to your microservices.
Store the name of your namespace in the
NAMESPACE
environment variable. You will need it to recognize your microservices in the logs:Create an environment variable for the hostname of the Istio ingress gateway:
Configure an Istio ingress gateway:
Set
INGRESS_HOST
andINGRESS_PORT
using the instructions in the Determining the Ingress IP and ports section.Add the output of this command to your
/etc/hosts
file:Access the application’s home page from the command line:
Paste the output of the following command in your browser address bar:
Simulate real-world user traffic to your application by setting an infinite loop in a new terminal window:
Check the graph of your namespace in the Kiali console
my-kiali.io/kiali/console
. (Themy-kiali.io
URL should be in your/etc/hosts
file that you set previously).This time, you can see that traffic arrives from two sources,
unknown
(the Kubernetes Ingress) and fromistio-ingressgateway istio-system
(the Istio Ingress Gateway).Kiali Graph Tab with Istio Ingress Gateway At this point you can stop sending requests through the Kubernetes Ingress and use Istio Ingress Gateway only. Stop the infinite loop (
Ctrl-C
in the terminal window) you set in the previous steps. In a real production environment, you would update the DNS entry of your application to contain the IP of Istio ingress gateway or configure your external Load Balancer.Delete the Kubernetes Ingress resource:
In a new terminal window, restart the real-world user traffic simulation as described in the previous steps.
Check your graph in the Kiali console. After about a minute, you will see the Istio Ingress Gateway as a single source of traffic for your application.
Kiali Graph Tab with Istio Ingress Gateway as a single source of traffic
You are ready to configure logging with Istio2.