Deploy Application With Istio Gateway and Virtual Service¶
Now that we have a good understanding of traffic management in Istio, let's deploy a simple application using traffic management API resources such as Gateway and Virtual Service.
Step 1: View Istio Proxy Configuration¶
Note down the current proxy configuration:
# Retrieve proxy configuration
istioctl proxy-config routes svc/istio-ingressgateway -n istio-system
Step 2: Deploy the Application¶
Prepare the manifest files for our application as follows:
Assuming your folder structure looks like the one below:
Apply the manifests to deploy the application with istio gateway and virtual service:
This will create the following kubernetes and Istio resources:
- Kubernetes namespace
- Kubernetes Deployment
- Kubernetes Service
- Istio Gateway
- Istio Virtual Service
Step 3: View the Updated Istio Proxy Configuration¶
View the updated proxy configuration:
# Retrieve proxy configuration
istioctl proxy-config routes svc/istio-ingressgateway -n istio-system
Step 4: Add DNS Record in Route 53¶
Go to AWS Route 53 and add a record that points test.example.com
to the load balancer created by Istio Ingress Gateway.
Open any browser and visit test.example.com
to verify app.
Here's how the traffic flows across Istio and kubernetes resources:
graph LR
A(User) --> B("Application Load Balancer
(associated with istio ingress gateway)");
B --> C("test-gateway
(Istio Gateway)");
C --> D("test-virtualservice
(Istio Virtual Service)");
D --> E(test-svc);
In the next section we will update ExternalDNS
to make it work with Istio so that DNS records are automatically created in Route 53 based on hosts provided in Istio virtual services.
Clean Up¶
Delete the kubernetes and istio resources we created: