A Guide to K3s Ingress Using Traefik with NodePort

For a better understanding of an invaluable cloud concept

Jonathan Scott
Published in
7 min readDec 2, 2020

--

A cloud consists of ephemeral server groups called clusters and a proper way to allocate containers to the servers. A container is a way to package an application into a standardized unit, so that it can reliably run on any server within the cloud. Directing traffic from external clients to the containers within the cloud, while ensuring the external client remains agnostic to the cloud, is a recurring problem. A common solution is to create an ingress controller.

ingress

the action or fact of going in or entering
- Oxford Dictionary

The ingress controller is delegated the responsibility of taking incoming traffic from an external client, and determining to which container the traffic should be directed.

This is a fairly intuitive concept that does not require any technical expertise. Imagine that you are attending a Broadway play and you possess a blue ticket with the number 10 written on it. There are no instructions on the ticket. When you arrive to the play, you are greeted by an usher who directs you to a specific seat in the theater. You have been directed to the correct seat without needing to understand the organization system; however, you understand that your ticket in some way played a defining role in the exchange. Now, imagine that you are the usher. Your first question should be, given a ticket color and number, how do you locate the seat? As it turns out, the theater is arranged in three sections corresponding to blue, green, and yellow tickets. Within each section, the seats are allocated at random. When you greet a customer, you check their ticket color and walk them to the correct section of the theater. You ignore the ticket number as this turns out to be irrelevant. The point is that the usher (ingress) understands the organization system of the theater (cloud) and is able to direct customers (external clients) to the correct seat (container) while the customer (external client) need not understand anything except for the simple contract of displaying the ticket (url).

Ingress for Kubernetes

Terminology

--

--