Versions Compared

Key

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

...

Ingress installation

Prerequisites

First we added assign a new node label to the a cluster node, which will take care of routing incoming requests to the appropriate services. This node will receive requests from the internet, so it must have a FIP.So, we created a new VM (Launch and manage instances) with a low-medium flavor, as it should only act as an ingress, and joined it to cluster, using the comand kubeadm join (Building the cluster). We then assigned to the node, through a label, the "role" of ingress with the command

Code Block
languagebash
titleInsert label
# Enter the node name and label. The optional "--overwrite" flag is used in case the value is already present
$ kubectl label node <node_name> kubernetes.io/role=<label_value> [--overwrite]
# Alternatively, you can edit the label directly in a text editor
$ kubectl edit node <node_name>

The addition of the label will be used later, to indicate on which node to install the input controller Pod. The same operation can also be performed on the other nodes (, assigning the role of worker), in order to obtain

Code Block
languagebash
titleRoles of nodes
# Note the "ROLES" column
$ kubectl get node
NAME                     STATUS   ROLES     AGE     VERSION
mycentos-0.novalocal     Ready    master    70d     v1.20.45
mycentos-1.novalocal     Ready    worker    69d     v1.20.45
mycentos-2.novalocal     Ready    worker    69d     v1.20.45
mycentos-ing3.novalocal     Ready    ingress   4d19h   v1.20.45

Ingress Controller

As said previously, you must have an Ingress controller to satisfy an Ingress. Only creating an Ingress resource has no effect. There are several input controllers, here we will use one of the most used. We will use the Nginx Ingress Controller guide as a reference. For more information, we recommend that you consult the official guide (an installation with Helm is also available on the same site).

...