Enoncé TP 3

/images/k8s.jpeg

TP3 : Ingress et exposition

🇫🇷 Version Française

NGINX controller setup

Cette commande va construire un ingress controller afin d’exposer certaine route de notre cluster sur internet

minikube addons enable ingress

Pour l’instant aucune route n’est défini, donc cette commande a juste créés des pods et des services en plus dans notre cluster.

(D’ailleurs cette commande a déjà été joué sur votre cluster)

Service

Nous allons enlever le type NodePort à notre service frontend afin qu’on ne puisse plus y accéder que par l’ingress que nous allons créér juste apres.

Ingress applicatif

Créer un ingress qui va servir à établir les routes vers nos différents services.

Cet ingress va devoir créér une route (la racine /) vers notre service frontend sur le port 80.

Pour tester on devrait pouvoir accèder à notre application directement sur l’ip de la machine dans notre navigateur.

🇬🇧 English version

NGINX controller setup

This command will build an ingress controller in order to expose certain routes of our cluster on internet

minikube addons enable ingress

Currently no route are defined, so this command will just create additional pods and services in our cluster.

(By the way, the command has already been executed on the VM)

Service

We are going to remove the NodePort type from our frontend service so that we can only access it through the ingress that we will create just after.

Ingress applicatif

Create an ingress which will be used to establish the routes to our different services.

This ingress will have to create a route (the root /) to our frontend service on port 80.

To test it we should be able to access our application directly on the machine’s IP in your browser.

Latest Posts