Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hardillb/k8s-ingress-to-avahi
Generates mDNS CNAME entries for K8s Ingress Host Names
https://github.com/hardillb/k8s-ingress-to-avahi
avahi ingress k8s kubernetes mdns
Last synced: 18 days ago
JSON representation
Generates mDNS CNAME entries for K8s Ingress Host Names
- Host: GitHub
- URL: https://github.com/hardillb/k8s-ingress-to-avahi
- Owner: hardillb
- License: apache-2.0
- Created: 2020-12-28T16:13:47.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-03T14:19:06.000Z (over 3 years ago)
- Last Synced: 2024-10-31T04:03:25.398Z (2 months ago)
- Topics: avahi, ingress, k8s, kubernetes, mdns
- Language: JavaScript
- Homepage: https://www.hardill.me.uk/wordpress/2020/12/28/setting-up-mdns-cname-entris-for-k8s-ingress-hostnames/
- Size: 27.3 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# k8s-ingress-to-avahi
A quick and dirty hack to turn Ingress hostnames into mDNS CNAME entries
## Install
```
$ git clone https://github.com/hardillb/k8s-ingress-to-avahi.git
$ cd k8s-ingress-to-avahi
$ npm install
```## Running
This runs on the Ingress Host machine outside of Kubernetes (might be able to get it to work in a container,
but will need the DBUS socket mounting into the container)The script take 3 arguments
- The path to the kubctl config file
- The mDNS hostname of the Ingress machine
- Optional namespace to watch (uses default if not present)e.g.
```
$ node index.js /home/ubuntu/.kube/config ubuntu.local
```
or```
$ node index.js /home/ubuntu/.kube/config ubuntu.local foo
```The Ingress YAML should look something like this:
```
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: manager-ingress
spec:
rules:
- host: "manager.ubuntu.local"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: manager
port:
number: 3000
```## No HTTPS support
Might add this later, but it would require custom Certificate Authority to
issue certs for `.local` domain.