
Istio is an open-source service mesh that provides a way to manage the communication and data sharing between microservices. Istio gives you the ability to find-grained control over what happens to your traffic. Istio simplifies the process of setting up important tasks such as A/B testing, canary rollouts, and percentage-based traffic splits.
Vultr Kubernetes Engine (VKE) is a fully-managed Kubernetes product. When deploying an application to VKE, Kubernetes automatically spreads Pods across different nodes in a cluster for better availability.
This article explains how to deploy and configure Istio for Ingress Gateway without TLS Termination on VKE, using an NGINX server to handle TLS/SSL traffic and Istio Ingress Gateway to send encrypted SSL requests directly to the NGINX server.
Before you begin, you should:
kubectl and git on your machine.Go to istio release page to download the istioctl for your OS or run the following command to download the latest release automatically into your local machine (Linux or Mac OS)
Install istio with istioctl
The result should look like
If you don't have enough resources, the installation can't finish. Check the events for more information.
This section shows how to deploy an NGINX server for HTTPS traffic on port 443. This NGINX server also redirects all HTTP traffic on port 80 to the corresponding HTTPS endpoint.
Here are some approaches to obtaining TLS/SSL Certificates:
Download a copy of your TLS/SSL certificates. You need:
Create a Kubernetes Secret to hold the TLS certificates. Replace nginx.example.com.key and nginx.example.com.crt with your certificate filenames.
Create a file named nginx.conf for the NGINX config. The NGINX server performs SSL termination with the above certificate. This also configures the NGINX server to redirect all the HTTP traffic to HTTPS. Replace nginx.example.com with your domain name.
Create the ConfigMap with the above nginx.conf.
Create a deployment file named deployment.yml. This file includes a Service to route the traffic to the correct pods.
Deploy the deployment.yml with istioctl to automatically inject the Istio sidecar proxy to the NGINX pod.
This section configures an Istio Ingress Gateway to manage the ingress traffic. This gateway exposes the Virtual Service in the next step to users outside the Kubernetes Cluster.
Note that the PASSTHROUGH TLS mode instructs the gateway to pass the traffic to the target service without terminating TLS.
Create a file named gateway.yml as follows. Replace nginx.example.com with your domain name
Deploy the gateway.yml with kubectl
A Virtual Service lets you configure how to route the traffic to a Service within the cluster.
This section configures routes for traffic entering via the gateway (mygateway) in the previous step.
Create a file named virtual-service.yml with the following routing rules. Replace nginx.example.com with your domain name.
Deploy the virtual-service.yml with kubectl
Find the IP of the load balancer. You can also go to the Load Balancer page in the Vultr Console to inspect your Load Balancers.
Create an A Record on your domain, such as nginx.example.com, that points to the Vultr Load Balancer IP address.
Navigate to https://<YOUR_DOMAIN> to access your NGINX server.
To learn more about Istio, see the project documentation.
0 Comments
Be the first to comment and share your perspective with the community.