NGINX Ingress Controller
NGINX Ingress Controller
by DigitalOcean

Version 0.32.0



Configuring a webserver or loadbalancer is harder than it should be. Most webserver configuration files are very similar. There are some applications that have weird little quirks that tend to throw a wrench in things, but for the most part you can apply the same logic to them and achieve a desired result.

The Kubernetes Ingress resource embodies this idea, and an Ingress controller is meant to handle all the quirks associated with a specific "class" of Ingress.

The NGINX Ingress Controller is built around the Kubernetes Ingress resource, using a ConfigMap to store the NGINX configuration.

The NGINX Ingress Controller is a daemon, deployed as a Kubernetes Pod, that watches the apiserver's /ingresses endpoint for updates to the Ingress resource. Its job is to satisfy requests for Ingresses.

Note: The NGINX Ingress Controller 1-Click App also includes a $10/month DigitalOcean Load Balancer to ensure that ingress traffic is distributed across all of the nodes in your Kubernetes cluster.

Software Included

Getting started after deploying NGINX Ingress Controller

How to Connect to Your Cluster

Follow these instructions to connect to your cluster with kubectl and doctl. Additional instructions for connecting to your cluster are included in the DigitalOcean Control Panel.

You may also connect to your cluster without using doctl if you have taken the following prerequisite steps:

  1. Created a cluster in the DigitalOcean Control Panel.
  2. Downloaded the Kubernetes config file to ~/Downloads directory on your local machine. The config file will have a name like nginx-k8s-1-15-3-do-1-sfo-kubeconfig.yaml.
  3. Installed the Kubernetes command line tool, kubectl, on your local machine. (Here are instructions for doing that) if you have not already done so.

After you complete those prerequisites, copy the Kubernetes config file to the default directory kubectl looks in.

cp ~/.kube/config  ~/.kube/config.bkup
cp  ~/Downloads/monitoring-k8s-1-15-3-do-1-sfo-kubeconfig.yaml  ~/.kube/config

You should now be able to connect to your DigitalOcean Kubernetes cluster and successfully run commands like:

kubectl get pods -A

How to confirm that NGINX Ingress Controller is running

Verify Nginx Ingress was installed correctly by running this command:

kubectl get pods --all-namespaces -l

You should get output similar to the following:

NAMESPACE       NAME                                        READY   STATUS    RESTARTS   AGE
ingress-nginx   nginx-ingress-controller-7fb85bc8bb-4s2sl   1/1     Running   0          152m

Then, get the IP address of your NGINX Ingress Controller Load Balancer by running this command:

kubectl get svc -n ingress-nginx

Your IP address will be in the EXTERNAL-IP column.

Managing nginx-ingress


To update your installation of nginx-ingress

helm repo add ingress-nginx
helm repo update
helm upgrade nginx-ingress ingress-nginx/ingress-nginx --namespace ingress-nginx


To delete your installation of nginx-ingress:

helm uninstall nginx-ingress --namespace ingress-nginx

API Creation

In addition to creating NGINX Ingress Controller via the control panel, you can also use the DigitalOcean API.

As an example, to create a 3 node DigitalOcean Kubernetes cluster made up of Basic Droplets in the SFO2 region, you can use the following curl command. You’ll need to either save your API access token to an environment variable or substitute it into the command below.

  curl -X POST -H "Content-Type: application/json" \
      -H "Authorization: Bearer '$TOKEN'" -d \
      '{"name": "choose-a-name","region": "sfo2","version": "1.17.5-do.0","node_pools": [{"size": "s-1vcpu-2gb","count": 3,"name": "choose-a-name"}]}' \

Support Details

Supported By:DigitalOceanDigitalOcean
Support URL:

More DigitalOcean Links

DigitalOcean Community

Developers supporting developers

Ask a Question

Ask anything related to system administration, programming, devops, open source, or the DigitalOcean platform.

List your 1-Click App in the DigitalOcean Marketplace

Partner with us to build traction for your open source project or software company