Kubernetes Ingress using Lua in Openresty.
kube-openresty-ingress
implements an
ingress controller
for Kubernetes. It acts as both a controller and the load-balancer.
It should be ran as a replication controller. It needs to be exposed
via a service.
Based on https://github.com/kubernetes/contrib/tree/master/Ingress/controllers/nginx-alpha
Use the included Dockerfile to build an image. kube-openresty-ingress.json can be used as an example for creating the Kubernetes resources.
- Can be used as a namespace specific or a global load balancer.
- Can be limited to certain ingresses using a labelSelector
- Multiple ingresses per controller by default.
- Does not support a default target for an ingress. Use
/
as the path to catch all unspecified traffic. - Uses DNS for service lookups allowing the ingress to be created before the services.
The included start script attempts to read the nameservers from
/etc/resolv.conf
inside the container.
Environment variables:
NAMESPACE
- limit ingress to a specific namespace. Defaults to global.CLUSTER_DOMAIN
- domain for cluster DNS. defaults tocluster.local
LABEL_SELECTOR
- label selector for fetching ingresses. No default.
- Handle default ingress target
- Fetch service address using Kubernetes API rather than DNS. Errors with DNS even when using caching.
See LICENSE
Includes a vendored copy of:
Written by the Engineering Team at Yik Yak