Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We verify that the ingress resource has been created correctly. The uncommented lines of the nginx-ingress.yaml file are used to make the FIP appear in the ADDRESS column.

Code Block
languagebash
titleIngress resource
# In the ADDRESS column there is the FIP of the ingress node
$ kubectl get ing -n nginx-ingress
NAME                           CLASS    HOSTS              ADDRESS          PORTS     AGE
cafe-ingress                   <none>   cafe.example.com   131.154.97.164   80, 443   20h

Let's move to the browser

We prove that everything works by moving to the browser. Since the cafe.example.com site is not registered on a DNS, we have to insert a line in the /etc/hosts file of our local machine (example on Windows the full path is C:\Windows\System32\drivers\etc\hosts)

Panel
title/etc/hosts

131.154.97.164 cafe.example.com

If we now enter cafe.example.com/tea or cafe.example.com/coffee in the address bar of our browser, we should get, respectively, a web page with the following info

Panel
titlecafe.example.com
Server address: 10.10.94.71:8080
Server name: tea-69c99ff568-68bnr
Date: 23/Sep/2020:13:20:22 +0000
URI: /tea
Request ID: c2c8de16a55223239bdedee5abe4a8a4
--------------------------------------------------------
Server address: 10.10.94.70:8080
Server name: coffee-5f56ff9788-l5l9h
Date: 23/Sep/2020:13:07:09 +0000
URI: /coffee
Request ID: babe3fa35d62d2dc0efa6d60a58214e3

These two web pages, while very simple, assure us that the addressing mechanism works correctly.