How to use nginx as ingress router to expose your microservices in Kubernetes

Published 28.03.2021

Author Fabian Peter

Categories Engineering

Many applications running Kubernetes are web applications that need to serve HTTP traffic. For scenarios like this, Kubernetes has so called ingress objects that can be used to direct traffic to microservices. Under the hood, the Ingress Controller is powered by tools like Traefik, Istio or nginx.

To expose a service to the public with the help of an ingress object, we first need to install the appropriate Ingress Controller – in our case nginx.

The following steps are taken from the official documentation.

Install nginx to your Kubernetes cluster

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx 
helm repo update 
helm install ingress-nginx ingress-nginx/ingress-nginx

That’s it. You’re now ready to create ingress resources. To learn how to expose an application using nginx-ingress, read the following article:

More stories from our blog

Unikernel Vs Container Vs VMs: Here is what you should use

Unikernel Vs Container Vs VMs: Here is what you should use

If you’d gone through Containers, Unikernels and VMs, I would bet you’re confused about which one to try for your new venture. It’s normal and happens to everyone while experimenting with adopting new technology. Remember the age-old dilemma of you thinking which...

How to build a Kubernetes cluster on HETZNER with k3s

How to build a Kubernetes cluster on HETZNER with k3s

HETZNER is a german cloud provider having very competitive prices for linux-based VMs. It's a great place to run Kubernetes, as HETZNER provides many integrations with their systems we can leverage when running Kubernetes: CSI IntegrationTerraform...

The DevOps Roadmap: Docker

The DevOps Roadmap: Docker

The containerization revolution has just begun, which means you have heard about docker at least once in your professional life. Containerization has made our apps’ deployment cycle faster and efficient. Leading the containerization wave is docker, the most popular...

Why you should focus on enough instead of more?

Why you should focus on enough instead of more?

Time is a precious commodity, and you might have heard this a thousand times now. But the stuff more important than time is the focus. I have seen people achieve more in less time due to the exceptional focus skills they have. Focus leads to productivity, and...

CNCF Meetup Saar #1

CNCF Meetup Saar #1

The first edition of our CNCF Meetup Saar was on February 25th from 11:00 to 13:00 CET. It was a very fun event with enlightening talks and a few quirks. You can enjoy a recap of the event and the talks below. Recap Full Event...

Why overstimulation sucks your happiness?

Why overstimulation sucks your happiness?

It’s small-time I have been here on this planet, and a trait is occurring for the last few years. I am not so joyful I used to be. It’s hard to pinpoint some reasons, but when a thing bothers you every day and keeps you awake with heartache, it must become your...

Serverless, FaaS and why do you need them?

Serverless, FaaS and why do you need them?

In recent years, serverless adoption has started, with more and more individuals depending on serverless technology to meet organizations’ specific needs. A survey conducted by Serverless Inc showed in 2018 that half of the respondents used serverless in their job,...

The DevOps Roadmap: Unikernels

The DevOps Roadmap: Unikernels

Containerization is one of the core building principles of clouds and DevOps, but traditional VMs and containers lack the security and agility that modern infrastructure craves. We are moving towards workloads that are smaller, faster, and more secure than the...

Interested in what we do? Looking for help? Wanna talk about software strategy?