ingress-nginx-helm/examples/deployment/nginx
Fernando Diaz 86b52fa957 Add more descriptive steps in Dev Documentation
Adds more descriptive steps in the Development Documentation,
like more information on obtaining dependencies, building, and
deploying an image of the ingress controller. Also adds more
descriptive information on deploying as well as some fixes
on grammar and spelling.
2017-08-02 23:02:02 -05:00
..
kubeadm Add more descriptive steps in Dev Documentation 2017-08-02 23:02:02 -05:00
default-backend.yaml Update the nginx controller manifests to run in the kube-system namespace, be deployments and some general cleanup 2017-01-05 09:40:40 +02:00
nginx-ingress-controller.yaml Release nginx 0.9.0-beta.11 2017-07-15 13:56:38 -04:00
README.md Add more descriptive steps in Dev Documentation 2017-08-02 23:02:02 -05:00

Deploying the Nginx Ingress controller

This example aims to demonstrate the deployment of an nginx ingress controller.

Default Backend

The default backend is a Service capable of handling all url paths and hosts the nginx controller doesn't understand. This most basic implementation just returns a 404 page:

$ kubectl apply -f default-backend.yaml
deployment "default-http-backend" created
service "default-http-backend" created

$ kubectl -n kube-system get pods
NAME                                    READY     STATUS    RESTARTS   AGE
default-http-backend-2657704409-qgwdd   1/1       Running   0          28s

Controller

You can deploy the controller as follows:

  1. Disable the ingress addon:
$ minikube addons disable ingress
  1. Use the docker daemon
  2. Build the image
  3. Create the default-backend:
$ kubectl apply -f default-backend.yaml
  1. Change nginx-ingress-controller.yaml to use the appropriate image. Local images can be seen by performing docker images.
image: <IMAGE-NAME>:<TAG>
  1. Create the nginx-ingress-controller deployment:
$ kubectl apply -f nginx-ingress-controller.yaml
deployment "nginx-ingress-controller" created

$ kubectl -n kube-system get pods
NAME                                       READY     STATUS    RESTARTS   AGE
default-http-backend-2657704409-qgwdd      1/1       Running   0          2m
nginx-ingress-controller-873061567-4n3k2   1/1       Running   0          42s

Note the default settings of this controller:

  • serves a /healthz url on port 10254, as a status probe
  • takes a --default-backend-service argument pointing to the Service created above

Running on a cloud provider

If you're running this ingress controller on a cloud-provider, you should assume the provider also has a native Ingress controller and set the annotation kubernetes.io/ingress.class: nginx in all Ingresses meant for this controller. You might also need to open a firewall-rule for ports 80/443 of the nodes the controller is running on.