
What is Kubernetes Ingress?
Ingress is a kubernetes object used to provide access to applications in Kubernetes cluster from the outside world. It can route requests coming to a specific host name or path to a specific service. For example, it can route a request coming to example.com/app address to a Kubernetes service namedapp-service.

What is Nginx Ingress Controller?
NGINX Ingress Controller uses NGINX to route requests coming to applications running in a Kubernetes cluster. It monitors Ingress objects and routes incoming requests to different services according to specific rules. In Kubernetes ecosystem, there are also various other Ingress Controllers besides NGINX. The most well-known of these are: traefik, HAProxy, Envoy, Ambassador.
MetalLB Installation
MetalLB (Metal Load Balancer) is a network load balancer solution for Kubernetes clusters. You can perform MetalLB installation to kubernetes cluster with the following command.Creating External IP Pool
An IP address pool needs to be created for MetalLB usage. Create a yaml file and add the content of IPAddressPool type found below.Nginx Controller Installation
You can install nginx controller to kubernetes cluster using Helm. The purpose of using Helm is to manage all configuration files needed to bring up applications in Kubernetes cluster and facilitate the installation process. In this step, first install helm and then add Nginx controller repo.

Apinizer Deploy Example
In the following command output, the namespace and POD where Apinizer Management Interface runs are shown.

Creating Ingress Object
Before using Ingress, an Ingress resource needs to be created to define how your application will be accessed at which URLs. Ingress resource specifies rules that route incoming requests to targets by being monitored by Nginx Ingress Controller. Create an Ingress object in Kubernetes by creating a yaml file and editing relevant configurations according to ourselves.If Using Certificate:
You can edit the key, cert and namespace fields below according to your environment./ path match this rule.
pathType: Prefix In this field, it is specified that the specified path is a prefix. That is, requests with / path match all paths starting with / prefix.
backend: service: name: manager In this field, the name of the target service where requests will be routed is written.
port: number: 8080 In this field, your service’s port number (8080) is specified.
In this application, we will continue without using certificate.
Create an ingress object using the yaml file.

DNS Definition
As the first step, open the/etc/hosts file with a text editor.
This file is a local DNS (Domain Name System) file where IP addresses and corresponding host names are matched.
Result
curl command can be used in the test step or access can be provided through browser. When a request is made to demo.apinizer.com/apinizer/management/health address, the result should be as follows:


