Exercise 2: Expose Istio Ingress gateway
Last updated
Last updated
The following procedures are platform specific and work with a "standard classic" Kubernetes Cluster provided by the IBM Cloud Kubernetes Service (IKS) on the IBM Cloud.
If you are using a VPC based or a free ("Lite") Kubernetes Cluster on the IBM Cloud or another Cloud provider or something like Minikube, the following sections will not work!
When you install Istio on a Kubernetes Cluster on IBM Cloud, the Istio Ingress is created with a Kubernetes service of type LoadBalancer -- this is called a Network Load Balancer or NLB on IBM Cloud. A "floating" IP address is assigned to it through which it can be reached on the public Internet.
In this section we will assign a subdomain DNS entry for this IP address so that the Istio Ingress can be accessed using a URL.
$MYCLUSTER
variableIf this isn`t the case run, following commands:
Copy your cluster name from the output
Export the $MYCLUSTER
variable
Example output:
$INGRESSURL
variable for later usageInsert your YOUR_INGRESSURL
value.
The following steps show the manual steps of the automated setup. This is just for your information, you don't need to run them!
When we install Istio on our pre-provisioned Kubernetes Clusters on IBM Cloud, the Istio Ingress is created with a Kubernetes service of type LoadBalancer and is assigned a "floating" IP address through which it can be reached on the public Internet. You can determine this address with the following command:
Output for example:
Our Ingress gateway is in fact of type LoadBalancer, the second IP address of the example 149.***.131.***
is the external (public) IP address. We need this public IP address in the next command.
To create a DNS subdomain -- a URL
-- for the Ingress gateway use the following command:
The new subdomain will have the form [cluster name]-[globally unique hash]-[sequence].[region].containers.appdomain.cloud
. The output should look like this:
This will be the URL we will use later to access Keycloak and our sample application. Copy the URL and paste it into an environment variable: