NGINX as an Ingress Controller in
Kubernetes
Speaker: Kevin Jones
Global Product Specialist
But first…
3
“... when I started NGINX,
I focused on a very specific
problem – how to handle more
customers per a single
server.”
- Igor Sysoev, NGINXcreator and founder
458 million
Total sites running on NGINX
Source: Netcraft January 2018 Web Server Survey6
62%
of the Top 10,000 most visited websites
Source: : W3Techs Web Technology Survey136
54%
of the Top 100,000 most visited websites
Source: : W3Techs Web Technology Survey137
40%
of all instances on Amazon Web Services
Source: : Sumologic: The State of Modern Applications in AWS Report138
About NGINX, Inc.
• Founded in 2011, NGINXPlus first released in
2013
• VC-backed by enterprise software industry
leaders
• Officesin SF, London, Cork, Singapore and
Moscow
• 1,400+ commercial customers
• 200+ employees
8
NGINX for Microservices
9
NGINX helps ensure microservices are:
• Connected
• Served
• Authenticated
• Secured
• Cached
• Load Balanced
• Scaled
NGINX for API Gateways
10
NGINX provides:
• Integration
• Security
• Request Routing
• Optimization
• Scalability
NGINX for Hybrid Cloud & Scaling
11
NGINX Plus can:
• Run anywhere
• React to environment downtime
• Outperformcloud load balancers
• Load balance across locations
• Scale without additional costs
Benefits of Kubernetes
13
Kubernetes is an open-source system for
automating deployment, scaling, and
management of containerized applications
Kubernetes makes ops easy…
• Run anywhere
• Rolling updates
• Fault Tolerance
• Horizontal Scaling
• Load Balancing
• YAML… and more!
14
Built in Load Balancing
1
6
kube-proxykube-proxy
hello
kube-proxy
hello
NodePort NodePort NodePort
hello
Built-in load balancing - NodePort
1
7
kube-proxykube-proxy
hello
kube-proxy
hello
NodePort NodePort NodePort
hello
LB
LoadBalancer
18
• Simple and easy to setup
• Limited to layer 4 load balancing
• If you need advanced load balancing
consider using an Ingress controller so you
can bring your own!
Built-in load balancing
Why use an Ingress?
20
Ingress
• Kubernetes resource
• Benefits
• Externally reachable URLs
• Advanced L7 Load Balancing
• SSL/TLS
• SNI (hostname based routing)
21
Ingress Example – Basic
22
Ingress Example – URL based routing
23
Ingress Example – Host based routing
24
Ingress Example – SSL offloading
25
Ingress
• Pluggableload balancer implementation:
• NGINX/NGINX Plus
• GCE HTTP load balancer
• HAProxy
• … and others
- A load balancer is integrated via an Ingress controller that
you must deploy
Deploying NGINX and NGINX Plus as
an Ingress Controller
NGINX and NGINX Plus
27
NGINX
• Load balancing w/ SSL/TLS
termination
• WebSocket and HTTP/2 support
• Layer 7 Routing/ Modification
NGINX Plus
• Session persistence
• JWT authentication
• 24/7 support, no additional cost
• Advanced Monitoring… and more!
28
NGINX Ingress Controller
• Runs in a container
• Well designed, fast and efficient golang script under the hood
• Community driven codebase
• Available for NGINX and NGINX Plus
https://github.com/nginxinc/kubernetes-ingress
29
NGINX Ingress Controller
30
My demo today…
• URL based routing
• Hostname based routing
• SSL termination at LB
• Support for scaling of replicas at LB via dynamic reconfiguration
../examples/complete-example/
31
My demo today…
• Café themed application
• Two services (URL routing)
◦ /Tea
◦ /Coffee
Configuring NGINX or NGINX Plus
without Ingress
33
Data store + template
• Register services with a data
store (aka etcd or consul)
• Template the NGINX
configuration and manage
NGINX service via CLI (confd
or consul template)
datastore
Services(containers)
NGINXOpenSource
34
We love APIs!
• Services availabilityis
managed by kubernetes and
availablevia API
• Orchestration script can be in
any language
• NGINX Plus upstreams
managed dynamically without
configuration reload
Services(containers)
NGINXPlusAPI
KubernetesAPI
Orchestration(script)
35
Service Discovery ;D
• Built in DNS resolver
• Control over TTL
• Easily Integrates with existing
DNS based service discovery
tools
Coming soon…
37
If you like NGINX,
you’ll love NGINX Plus!
nginx.com/developer-license
use code: hidden
Kevin Jones
@webopsx
Thank You!
Learn more at nginx.com

Using NGINX and NGINX Plus as a Kubernetes Ingress